5 ms·
I trust Numpy a lot for CSV handling. It deals with lots of edge cases including missing data, weird delimiters (pipes '|' are popular in astro for some reason
by joshvm 12y ago
I trust Numpy a lot for CSV handling. It deals with lots of edge cases including missing data, weird delimiters (pipes '|' are popular in astro for some reason) and massive files. If in doubt, whack it into Excel which has been doing this stuff for decades now. I prefer using Numpy to Python's CSV library which I find a bit clunky.
Very little data is actually true CSV.
The code isn't particularly long (~900 lines), it's Python (hence readable) and it's well commented:
https://github.com/numpy/numpy/blob/v1.8.1/numpy/lib/npyio.py#L1172 https://github.com/numpy/numpy/blob/v1.8.1/numpy/lib/npyio.p...
- jasode 12y ago>weird delimiters (pipes '|' are popular in astro for some reason) I can only guess that since it's astronomy data and constellation coordinates have decimal places, it's best to avoid the comma character because some countries use it as a decimal separator. http://en.wikipedia.org/wiki/Decimal_mark http://en.wikipedia.org/wiki/Decimal_mark