Load a CSV with different row lengths
skip at pobox.com
Tue Jul 29 12:29:14 CEST 2014
> How can I load this into python? I tried using both NumPy and Pandas.
To add to Peter's response, I would be very surprised if numpy or
Pandas couldn't be coaxed into loading your CSV file, but you didn't
provide any details about what you expected and what you got. I've
used Pandas to read CSV files a lot recently, and run into any
trouble. (I suspect all but a few have equal length rows, but in cases
where data are missing, I've found it generally inserts NaNs.)
In general, you'll get more useful feedback with more complete
questions. I'm not saying you need to necessarily provide code, but a
traceback or unexpected output would be helpful.
More information about the Python-list