Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #69395

RE: writing reading from a csv or txt file

From "Joseph L. Casale" <jcasale@activenetwerx.com>
Subject RE: writing reading from a csv or txt file
Date 2014-03-30 20:21 +0000
References <9023eae9-f814-40ac-9b84-043214e6b28f@googlegroups.com>
Newsgroups comp.lang.python
Message-ID <mailman.8722.1396210964.18130.python-list@python.org> (permalink)

Show all headers | View raw


> 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

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

writing reading from a csv or txt file mtcplumb@googlemail.com - 2014-03-30 12:05 -0700
  Re: writing reading from a csv or txt file Jason Friedman <jsf80238@gmail.com> - 2014-03-30 14:19 -0600
  RE: writing reading from a csv or txt file "Joseph L. Casale" <jcasale@activenetwerx.com> - 2014-03-30 20:21 +0000
  Re: writing reading from a csv or txt file Gary Herron <gary.herron@islandtraining.com> - 2014-03-30 13:26 -0700
  Re: writing reading from a csv or txt file Jason Friedman <jsf80238@gmail.com> - 2014-04-01 19:25 -0600

csiph-web