read and write csv file using csv module

Reply

Join Date: Oct 2007
Posts: 30
Reputation: jliu66 is an unknown quantity at this point 
Solved Threads: 0
jliu66 jliu66 is offline Offline
Light Poster

read and write csv file using csv module

 
0
  #1
Oct 19th, 2007
Hi, my friends,

I am new to python. I am trying to user csv module to read and write the data in csv. Here is data format. # of columns in each row are the same. 1st row is a header. how I can pass the data into 2-D array? Can you show a sampel code to read and write from a csv file please? Thanks so much in advance.

Equity #,No,Date,Long,Entry,Name1,Currency,Country
1,1,35860,AEP,48.38,AMERICAN ELECTRIC POWER,USD,USA
2,2,38412,AEP,33.71,AMERICAN ELECTRIC POWER,USD,USA
4,1,35094,CMS,31,CMS ENERGY CORP,USD,USA
4,2,35135,CMS,29.13,CMS ENERGY CORP,USD,USA


John
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 33
Reputation: paddy3118 is an unknown quantity at this point 
Solved Threads: 8
paddy3118 paddy3118 is offline Offline
Light Poster

Re: read and write csv file using csv module

 
0
  #2
Oct 19th, 2007
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC