Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.008 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'aggregate': 0.07; 'subject:file': 0.07; 'iterate': 0.09; 'measure': 0.09; 'rows': 0.09; 'statistical': 0.09; '(besides': 0.16; 'csv': 0.16; 'csv,': 0.16; 'here..': 0.16; 'math,': 0.16; 'received:172.18.0': 0.16; 'sqlite': 0.16; 'subject:txt': 0.16; 'subject:writing': 0.16; 'files.': 0.16; 'year,': 0.18; 'trying': 0.19; 'file,': 0.19; 'to:name:python-list@python.org': 0.22; 'header:Received:8': 0.24; 'math': 0.24; 'compare': 0.26; 'performing': 0.26; 'push': 0.26; 'least': 0.26; 'header:In-Reply-To:1': 0.27; 'skip:( 20': 0.30; 'file': 0.32; 'probably': 0.32; 'maybe': 0.34; 'subject:from': 0.34; 'could': 0.34; "can't": 0.35; 'but': 0.35; 'data,': 0.36; 'date.': 0.36; 'charset:us-ascii': 0.36; 'list': 0.37; 'list.': 0.37; 'to:addr:python-list': 0.38; 'files': 0.38; 'to:addr:python.org': 0.39; 'how': 0.40; 'read': 0.60; 'duration': 0.60; 'results.': 0.60; 'received:unknown': 0.61; 'first': 0.61; 'such': 0.63; 'pick': 0.64; 'finally': 0.65; 'book,': 0.68; 'collection.': 0.84; 'cutting': 0.91 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=Ur78AkMj4ME0q/xQKDu+fQsLaK/oG8/QJxPJp7yvMIc= c=1 sm=1 a=t4dFj6INbygA:10 a=7PYXob_7ZXMA:10 a=AgG5ixNBvo4A:10 a=BLceEmwcHowA:10 a=kj9zAlcOel0A:10 a=xqWC_Br6kY4A:10 a=oNw28mxuUhXRB3mVwYQ4Ag==:17 a=QhvWe78c9WwevS8R8y8A:9 a=CjuIK1q_8ugA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=activenetwerx.com; s=default; t=1396210894; bh=+WrapUFpmheheRjyjwzhi4xKsMuNKY5JTO4Kkc7wvfY=; h=From:To:Subject:Date:References:In-Reply-To; b=I25otcxngTThAXibxIq72In+FPcUYzwTPuhGzNFnwCbYHQrTpZwtQU2WHcfcxx+aH myJJtqW/SmnzgtHtasJTCwploWUCLaYRs9l96arJdrsFhb0BPReUxVZUZOubPdZ+lz oG+auvK45C1YzNqv8A98TkyVMz5lVwTuSu1rJ1LI= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=activenetwerx.com; s=default; t=1396210893; bh=+WrapUFpmheheRjyjwzhi4xKsMuNKY5JTO4Kkc7wvfY=; h=From:To:Subject:Date:References:In-Reply-To; b=AP+pIm5Cz5IK2hMju2E6swJckDMuH7YshdMe90T2qKQKzDHTx37spzBI6AbItl3d3 jwip893lb8u/MC79ynu5N/MAS4F2q/tdC6U4kRW8EysLX20X0vuGw/cW8BOGUsrQov MtLlfIZxeXxtjoPUwKDA0vhK6blgG+gFnZnBWPgE= X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.activenetwerx.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED autolearn=ham version=3.3.1 From: "Joseph L. Casale" To: "python-list@python.org" Subject: RE: writing reading from a csv or txt file Thread-Topic: writing reading from a csv or txt file Thread-Index: AQHPTEvjxBGgvkGZCkKexpa3FSst/Zr6ETUw Date: Sun, 30 Mar 2014 20:21:32 +0000 References: <9023eae9-f814-40ac-9b84-043214e6b28f@googlegroups.com> In-Reply-To: <9023eae9-f814-40ac-9b84-043214e6b28f@googlegroups.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [172.18.0.201] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 29 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1396210964 news.xs4all.nl 2908 [2001:888:2000:d::a6]:34051 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:69395 > 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,da= te. > first file (rainfall2013.csv)rainfall, duration,time of day,wind speed,da= te. > I would like to pick out maybe rainfalls and duration's and measure again= st > 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 per= form some math, because I can't help myself, I push this into sqlite at least bu= t that's probably overkill for you (besides the limitless benefits:)). You want to s= tore some state while you iterate over each row in the csv, appending data, then fina= lly performing some statistical math on the collection. You will do this for each file, then finally aggregate your results. jlc