Search code examples
f#deedle

specify null value for F# Deedle


is it possible to specify a customised value to represent null or NaN when loading csv into Deedle data structure? in Python pandas, this is a configurable list option.

Often the input data from csv will contain some arbitrary value to represent null while the rest of the column do have valid value (double type). Currently i have to load them all in then apply a function to the column to tryparse double.

thanks casbby


Solution

  • This is currently not supported, but I agree that it would be very useful! I created a GitHub issue to track this.

    We'll definitely add this at some point, but if you wanted to contribute and add support for specifying custom missing values, this is actually quite easy. Deedle uses CSV parser from F# Data, which already supports this functionality and so you really just need to add an additional optional parameter rather than using the default missing values here in the source code (and in other overloads). (And add some test to make sure we don't break this :-))

    A contribution would be absolutely awesome!!