Re: Importing a csv file



John Machin wrote:
On Apr 30, 7:21 pm, Tim Golden <m...@xxxxxxxxxxxxxxx> wrote:
sagar wrote:
Hi all ,
I want to read data in a csv file using the python scripts.
when i gave the following code :
import csv
reader = csv.reader(open("some.csv", "rb"))
for row in reader:
print row
it is showing :
Traceback (most recent call last):
File "csv.py", line 1, in <module>
import csv
File "C:\Documents and Settings\meesa02\csv.py", line 2, in <module>

Only *almost* certainly, Tim? *Maybe*? You don't believe what the
above traceback lines are telling you?

It's my natural British diffidence :) We almost never make
unqualified statements.

TJG
.



Relevant Pages

  • Re: Importing a csv file
    ... I want to read data in a csv file using the python scripts. ... 'module' object has no attribute 'reader' ...
    (comp.lang.python)
  • Re: _csv.Error: string with NUL bytes
    ... You really should post some code and the actual traceback error your ... own CSV dialect parser. ... phone, country, city, in csvreader: ...
    (comp.lang.python)
  • Re: Importing a csv file
    ... I want to read data in a csv file using the python scripts. ... 'module' object has no attribute 'reader' ...
    (comp.lang.python)
  • Re: Python 3.1 csv with gzip
    ... import gzip, csv, sys ... Traceback: ...
    (comp.lang.python)
  • Re: CSV Dialect Example Requested - NEWBIE
    ... >> the class in the csv module that you want to use as a base class is ... You need these additional attributes - just read the traceback :-) ...
    (comp.lang.python)