writing reading from a csv or txt file

Joseph L. Casale jcasale at activenetwerx.com
Sun Mar 30 16:21:32 EDT 2014


> Hi I have 3 csv files with a list of 5 items in each.
> rainfall in mm, duration time,time of day,wind speed, date.
> I am trying to compare the files. cutting out items in list list. ie:-
> first file (rainfall2012.csv)rainfall, duration,time of day,wind speed,date.
> first file (rainfall2013.csv)rainfall, duration,time of day,wind speed,date.
> I would like to pick out maybe rainfalls and duration's and measure against
> say years.
> I would like to very the items from the rows.
> could you please advise me where i can find such information. or book,
> textbook.

How about we help you here..

So if you want to compare by year, you want to read all the rows in and perform
some math, because I can't help myself, I push this into sqlite at least but that's
probably overkill for you (besides the limitless benefits:)). You want to store some
state while you iterate over each row in the csv, appending data, then finally performing
some statistical math on the collection.

You will do this for each file, then finally aggregate your results.

jlc



More information about the Python-list mailing list