User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Python section within the Software Development category of DaniWeb, a massive community of 456,552 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,477 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Python advertiser: Programming Forums
Views: 2942 | Replies: 1
Reply
Join Date: Oct 2007
Posts: 30
Reputation: jliu66 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 0
jliu66 jliu66 is offline Offline
Light Poster

Question read and write csv file using csv module

  #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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Sep 2007
Posts: 19
Reputation: paddy3118 is an unknown quantity at this point 
Rep Power: 2
Solved Threads: 2
paddy3118 paddy3118 is offline Offline
Newbie Poster

Re: read and write csv file using csv module

  #2  
Oct 19th, 2007
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Python Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Python Forum

All times are GMT -4. The time now is 5:16 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC