read and write csv file using csv module

Joined
Oct 19, 2007
Messages
3
Reaction score
0
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,520
Members
44,996
Latest member
rainocode

Latest Threads

Top