Open pkese opened 5 years ago
This would not work for CSV provider, because CSV provider needs to take a literal as a parameter (i.e. just a string) but it sounds pretty sensible for CSV parser in Deedle.
I'd be happy with this but perhaps also:
System.Type
(and perhaps a bool to indicate whether the column can have missing values)?
The combination of
inferTypes
andschema
is rather unflexible.In my case (I'm trying to process lots of slightly different .csv files) I'd much prefer if I was able to provide types based on actual column titles that the reader found in the .csv file.
I'd propose a
typeResolver
parameter toReadCsv
that would accept a lambda function that resolves column titles to target types:My aim at this point is to:
typeResolver
of typecolumn: string -> type: string option
or an even more flexibleschemaGenerator
of typecolumns: string list -> schema: string
)I'm willing to look into the issue and try to provide an implementation as well.