I wish to extract a column from a frame as a new double array in C#. For example:
我希望从一个帧中提取一个列作为C#中的一个新的双数组。例如:
double[] values = myFrame.GetColumn<double>("myColumnName");
1 个解决方案
#1
GetColumn returns Series. You just need to get series values and convert them to array. Something like that should work:
GetColumn返回Series。您只需要获取系列值并将它们转换为数组。这样的东西应该工作:
var arr = values.Values.ToArray();
or
var arr = values.GetAllValues().ToArray();
#1
GetColumn returns Series. You just need to get series values and convert them to array. Something like that should work:
GetColumn返回Series。您只需要获取系列值并将它们转换为数组。这样的东西应该工作:
var arr = values.Values.ToArray();
or
var arr = values.GetAllValues().ToArray();