Closed adamklein closed 9 years ago
Here is what I get using the following CSV sample: http://pastebin.com/6veM1796
// This loads the last row as <missing>
Frame.ReadCsv("C:/temp/test.csv")
// This loads all data as 'obj' and casts them on access
// so the values on the last row are loaded correctly
Frame.ReadCsv("C:/temp/test.csv", inferTypes=false)
// This will do type inference over the enitre file (slow)
// but will correctly load data as decimals internally
// (assuming the values fit in decimal)
Frame.ReadCsv("C:/temp/test.csv", inferRows=0)
// This will skip type inference and load two columns
// as "float" values internally - thanks to explicit schema
Frame.ReadCsv("C:/temp/test.csv", schema="float,float")
Do you also get an error if you do inferRows = 0, inferTypes = true? Is there a reason not to pass that combination?
I can write both of the following without error:
Frame.ReadCsv("C:/temp/test.csv", inferTypes=true, inferRows=0)
Frame.ReadCsv<DateTime>("C:/temp/test.csv", "Foo", inferTypes=true, inferRows=0)
They are extensions, so I have to add open Deedle
, but that's all. This is in VS 2013 with the latest update (perhaps that matters?)
To be fair - I wouldn't be all that surprised if something could go wrong here. The ReadCsv
method has a C#-style extension method and F#-style extension so that we can use F#-style optional arguments and C#-style optional arguments at the same time. This is quite messy :-(, but massive number of overloads looks equally bad.
Nevermind on the original error, cannot reproduce! Weird.
inferRows defaults to 100, not 0, so the docs are incorrect
Also, cannot seem to pass inferRows = 0 and inferTypes = true; get an error that doesn't seem to make sense: