4 ms·
Disagree. Data.table’s fread is leagues ahead of pandas. https://www.rdocumentation.org/packages/data.table/versions/1.12.8/topics/fread https://www.rdocument
by nojito 6y ago
Disagree.
Data.table’s fread is leagues ahead of pandas.
https://www.rdocumentation.org/packages/data.table/versions/1.12.8/topics/fread https://www.rdocumentation.org/packages/data.table/versions/...
Fread has automatic footer detection and has automatic skip logic to help parse out mangled headers in some csvs.
- vharuck 6y agofread can also accept a shell command which it will run and use the result as input. I use that to grep the lines I want from files too big for RAM.
- nojito 6y agoSame here! I also use fwrite to send it back to the shell to continue my processing pipeline. https://www.rdocumentation.org/packages/data.table/versions/1.12.8/topics/fwrite https://www.rdocumentation.org/packages/data.table/versions/... It's mind boggling how little fanfare data.table has despite it being the best way to handle tabular data in 2020.
- jsmith99 6y agofread is amazing. Whenever I look at the docs and see all the options for dealing with nested lists (like the within-column-seperator) I always pray never to have need of such a thing.
- jointpdf 6y agoAdditionally, RStudio has a built in GUI widget for importing .csv (and other) files: https://support.rstudio.com/hc/en-us/articles/218611977-Importing-Data-with-RStudio https://support.rstudio.com/hc/en-us/articles/218611977-Impo.... I find it quite useful for breezing through the common gotchas with importing data, and it’s probably the easiest way for inexperienced programmers (e.g. business analyst types used to working in Excel) to work with .csv.