[Tutor] Extracting columns from many files to different files

2012-07-16 Thread susana moreno colomer
Hi! I have a folder, with the following text files with columns: bb_ 1 bb_2 ww_1 ww_2 ff_1 ff_2 What I want to do is: Extract columns 5,6, 8 from files bb_ Extract columns 3,4 from files ww_ Get 5 files, corresponding to different columns: Files (excel files): 'ro' with colums number 5,

Re: [Tutor] Extracting columns from many files to different files

2012-07-16 Thread susana moreno colomer
...@gmail.com wrote: On Mon, Jul 16, 2012 at 10:58 AM, susana moreno colomer susana...@hotmail.com wrote: Hi! I have a folder, with the following text files with columns: bb_ 1 bb_2 ww_1 ww_2 ff_1 ff_2 What I want to do is: Extract columns 5,6, 8 from files bb_

Re: [Tutor] get columns from txt file

2012-07-13 Thread susana moreno colomer
Jul 2012 12:14:38 -0400 CC: tutor@python.org To: susana...@hotmail.com On Jul 12, 2012, at 12:06 PM, susana moreno colomer wrote: Hi! This code is working fine! The only one little thing is that the 6 columns appear together in one column, what means, in eac cell I get 6 numbers. How can I

Re: [Tutor] extracting a column from many files

2012-07-13 Thread susana moreno colomer
From: susana...@hotmail.com To: tutor@python.org Date: Thu, 12 Jul 2012 17:45:31 +0200 Subject: [Tutor] extracting a column from many files Hi! I want to extract from certain kind of files column number 5 and 6. I want to extract acolumns number 5 to one file, and anumber6 to

Re: [Tutor] get columns from txt file

2012-07-13 Thread susana moreno colomer
...@gmail.com To: susana...@hotmail.com CC: dfjenni...@gmail.com; tutor@python.org On Thu, Jul 12, 2012 at 11:36 PM, susana moreno colomer susana...@hotmail.com wrote: Hi! I am trying this, but still I get 6 numbers per cell. The only one difference is that I get a comma between numbers instead

Re: [Tutor] get columns from txt file

2012-07-12 Thread susana moreno colomer
to cc: the tutor list. It's really important because if someone (like me, for instance) steers you in the wrong direction, others will jump in with corrections. On Jul 12, 2012, at 9:48 AM, susana moreno colomer wrote: Hi! Many thanks! You're welcome. I see that your code is improving

Re: [Tutor] get columns from txt file

2012-07-12 Thread susana moreno colomer
Hi! It is attached on the email, called myprogram.txt Thank you! Subject: Re: [Tutor] get columns from txt file From: dfjenni...@gmail.com Date: Thu, 12 Jul 2012 11:07:53 -0400 CC: tutor@python.org To: susana...@hotmail.com On Jul 12, 2012, at 10:55 AM, susana moreno colomer wrote: Hi

[Tutor] extracting a column from many files

2012-07-12 Thread susana moreno colomer
Hi! I have a group of files in a directory: bb_1.txt bb_2.txt bb_3.txt bb_4.txt bb_5.txt bb_6.txt ss_1.txt I want to extract from files whose names start with bb_ column number 5 and 6. I want to extract all columns number 5 to one file, and all tcolumns number6 to another file. I was

Re: [Tutor] get columns from txt file

2012-07-12 Thread susana moreno colomer
: Thu, 12 Jul 2012 11:43:02 -0400 CC: tutor@python.org To: susana...@hotmail.com On Jul 12, 2012, at 11:10 AM, susana moreno colomer wrote: Hi! It is attached on the email, called myprogram.txt and, here are the contents of that file: #! /usr/bin/env python import os import fnmatch

[Tutor] get columns from txt file

2012-07-11 Thread susana moreno colomer
Hi! I have a group of files in a directory. I want to extract from files whose names start with bb_ column number 5 to an excel file. I have 6 bb_ files, therefore I want to get 6 columns (5th column from each file) This code is working,with the following errors: I get the data in only