Search code examples
c#functional-programmingdeedle

How to get a Column from a Frame as a double array type in Deedle C#?


I wish to extract a column from a frame as a new double array in C#. For example:

double[] values = myFrame.GetColumn<double>("myColumnName");

Solution

  • GetColumn returns Series. You just need to get series values and convert them to array. Something like that should work:

    var arr = values.Values.ToArray();
    

    or

    var arr = values.GetAllValues().ToArray();