You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there any way to override default csv type inference behavior
"Columns with only 0, 1, Yes, No, True, or False will be set to bool"
(or may be inject a callback somewhere)
and treat 0/1 column as number for random csv (no shema known upfront)?
Thanks.
@nhirschey thanks! Unfortunately my content is totally dynamic, no suggestions can be done upfront
So I introduced some post processing: if type inferred as boolean but column has only '0' and '1' cells, I forcely set it's type to integer.
I guess we should interpet this as a request for a feature request for a new static parameter StrictBooleans to the CsvProvider so that the provider only infers a boolean type for samples containing precisely true/false values
Currently the spec says: "Columns with only 0, 1, Yes, No, True, or False will be set to bool." With this static parameter this would become "Columns with only 0, 1, Yes, No, True, or False will be set to bool. If StrictBooleans is active, then columns with only true or false will be set to bool."
Is there any way to override default csv type inference behavior
"Columns with only 0, 1, Yes, No, True, or False will be set to bool"
(or may be inject a callback somewhere)
and treat 0/1 column as number for random csv (no shema known upfront)?
Thanks.
https://fsprojects.github.io/FSharp.Data/library/CsvProvider.html#Controlling-the-column-types
The text was updated successfully, but these errors were encountered: