943,985 Members | Top Members by Rank

Ad:
  • Python Discussion Thread
  • Unsolved
  • Views: 11513
  • Python RSS
Oct 19th, 2007
0

read and write csv file using csv module

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
jliu66 is offline Offline
30 posts
since Oct 2007
Oct 19th, 2007
0

Re: read and write csv file using csv module

Reputation Points: 21
Solved Threads: 11
Light Poster
paddy3118 is offline Offline
35 posts
since Sep 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Python Forum Timeline: neebee: python static classes
Next Thread in Python Forum Timeline: Limit size of a List





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC