[Tutor] FW: extract specific column
Anna Olofsson
olofsson_anna585 at hotmail.com
Wed Oct 12 21:59:34 CEST 2011
The thing is, I don't know where to start. I know how to open the attached file, but I don't know how to work inside the file. Is this a csv file? Do I need to use a split function? In what way should I look at the file? As a string? As lines?
Best,
Anna
From: waynejwerner at gmail.com
Date: Wed, 12 Oct 2011 14:54:42 -0500
Subject: Re: [Tutor] extract specific column
To: olofsson_anna585 at hotmail.com
CC: tutor at python.org
On Wed, Oct 12, 2011 at 12:21 PM, Anna Olofsson <olofsson_anna585 at hotmail.com> wrote:
Hi,
I'm a beginner at python and I'm trying to extract a specific column from a txt file ( see attached file).
In the attached file I want to extract the entire column
pph2_prob (i.e. column 16). But I want to get all the values from that column without the headline
pph2_prob.
How do I accomplish that?
Hi Anna,
We're more than happy to help, but we also would love to see what you've done so far. What have you tried so far? Can you get the entire column *with* the headline?
When you show the effort that you've taken, you'll find people are much more inclined to help - very few people here will do your work for you, but most of us are perfectly willing to point you in the right direction!
HTH,Wayne
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20111012/a5478bc9/attachment.html>
More information about the Tutor
mailing list