Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #75347 > unrolled thread

Re: Load a CSV with different row lengths

Started bySkip Montanaro <skip@pobox.com>
First post2014-07-29 05:29 -0500
Last post2014-07-29 05:29 -0500
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Load a CSV with different row lengths Skip Montanaro <skip@pobox.com> - 2014-07-29 05:29 -0500

#75347 — Re: Load a CSV with different row lengths

FromSkip Montanaro <skip@pobox.com>
Date2014-07-29 05:29 -0500
SubjectRe: Load a CSV with different row lengths
Message-ID<mailman.12414.1406629762.18130.python-list@python.org>
> 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.

Skip

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web