kshedden / datareader

Read binary SAS (SAS7BDAT) and Stata (dta) files in the Go (Golang) programming language. Also provides command line tools for working with these file formats.
BSD 3-Clause "New" or "Revised" License
23 stars 12 forks source link

Support various type conversions. #12

Open gmeixiong opened 5 years ago

gmeixiong commented 5 years ago

haven::read_sas is able to correctly parse "numeric" columns into integer or boolean columns. It's still not clear to me how haven::read_sas becomes aware of the underlying type, though if I had to guess it is related to how many bytes are stored for each column value.

It would be nice if datareader were able to similarly infer type and distinguish ints and bools from floats.