Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Neil Cerutti Newsgroups: comp.lang.python Subject: Re: What's the best way to extract 2 values from a CSV file from each row systematically? Date: 23 Sep 2013 17:20:41 GMT Organization: Norwich University Lines: 19 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: individual.net w3Rae9cyJS613/ggYtToKgCu6/9Xavl4UeCKByFE1FGtAxrEV8 Cancel-Lock: sha1:qsqg0PoRwbFkrmRecP563WXBhg0= User-Agent: slrn/0.9.9p1/mm/ao (Win32) Xref: csiph.com comp.lang.python:54651 On 2013-09-23, quarantinemiles@gmail.com wrote: > Hey guys, > > I'm a little new to Python, and am still learning! > > I'm test building a web scraper that extracts prices from a > website, based on two values I want to extract from a CSV file. > The CSV has at least 1000 rows, an example: > > 0,0,KGD,0,DME,0,,0,0 > > The values I want to extract are KGD and DME (columns 3 and 5). Use the csv module. http://docs.python.org/2/library/csv.html -- Neil Cerutti