machinelearning
machinelearning copied to clipboard
Accessing data by column after adding columns to a DataFrame returns error data
System Information (please complete the following information):
- OS & Version: Windows 11
- ML.NET Version: 3.01
- .NET Version: .NET 8.0
Describe the bug Accessing data by column after adding columns to a DataFrame returns error data
var df = DataFrame.LoadCsvFromString("a1,a2\n1,2\n3,4");
var dc0 = DataFrameColumn.Create("a0", new int[] { 0, 0 });
df.Columns.Insert(0, dc0);
var dc1 = df["a1"];
Console.WriteLine(dc1.ToString());
This code expected print: a1: 1 3
But it print: a0: 0 0