Miki Tebeka wrote:
> Greetings,
>
>> I should've mentioned that I want to import my csv as a data frame or
>> numpy array or as a table.
> If you know the max length of a row, then you can do something like:
> def gen_rows(stream, max_length):
> for row in csv.reader(stream):
>
Greetings,
> I should've mentioned that I want to import my csv as a data frame or numpy
> array or as a table.
If you know the max length of a row, then you can do something like:
def gen_rows(stream, max_length):
for row in csv.reader(stream):
yield row + ([None] * (max_
Hey skip,
I should've mentioned that I want to import my csv as a data frame or numpy
array or as a table.
Best regards,
Ryan
On Tue, Jul 29, 2014 at 6:29 AM, Skip Montanaro wrote:
> > How can I load this into python? I tried using both NumPy and Pandas.
>
> To add to Peter's response, I wou
> 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
Ryan de Vera wrote:
> I am trying to load a csv with different row lengths. For example,
>
> I have the csv
>
> a,b
> a,b,c,d
> a,b,c
>
> How can I load this into python? I tried using both NumPy and Pandas.
The csv module in the standard library can deal with var
I am trying to load a csv with different row lengths. For example,
I have the csv
a,b
a,b,c,d
a,b,c
How can I load this into python? I tried using both NumPy and Pandas.
--
https://mail.python.org/mailman/listinfo/python-list