On 7/13/2012 5:20 AM, susana moreno colomer wrote:
[snip]
Please post the entire traceback.
You did not tell us what error or where in option 1.
--
Bob Gailer
919-636-4239
Chapel Hill NC
___
Tutor maillist - Tutor@python.org
To unsubscribe or cha
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
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 fo
Here's a simple repositioning code given that you already have the
fields extracted.
All files have to have equal dimensions.
file1 = [["1a1", "1b1", "1c1",], ["2a1", "2b1", "2c1"],]
file2 = [["1a2", "1b2", "1c2",], ["2a2", "2b2", "2c2"],]
files = [file1, file2]
out_lines = []
for column in range
"Bala subramanian" wrote
I want to extract 1a1 2a1 3a1 from file 1, similarly 1a2 2a2 3a2
from file
2 ( same columns) and then make a new output file of the following
format
1a1 1a2 ---
2a1 2a2 ---
3a1 3a2 ---
Similarly for the 2nd, 3rd, 4th..columns in the input files.
OK, So you want
>
>
> file1:
> 1a1 1b1 1c1 1d1 1e1 1f1
> 2a1 2b1 2c1 2d1 2e1 2f1
> 3a1 3b1 3c1 3d1 3e1 3f1
>
> file2:
> 1a2 1b2 1c2 1d2 1e2 1f2
> 2a2 2b2 2c2 2d2 2e2 2f2
> 3a2 3b2 3c2 3d2 3e2 3f2
For example, if you have input files:
file1:
1a1 1b1 1c1 1d1 1e1 1f1
2a1 2b1 2c1 2d1 2e1 2f1
3a1 3b1 3c1 3d1 3e1 3f1
file2:
1a2 1b2 1c2 1d2 1e2 1f2
2a2 2b2 2c2 2d2 2e2 2f2
3a2 3b2 3c2 3
On Thu, Feb 19, 2009 at 2:41 AM, Bala subramanian
wrote:
> Dear friends,
>
> I want to extract certain 6 different columns from a many files and write it
> to 6 separate output files. I took some help from the following link
>
> http://mail.python.org/pipermail/tutor/2004-November/033475.html
>
>
On Thu, Feb 19, 2009 at 5:41 AM, Bala subramanian
wrote:
> Dear friends,
>
> I want to extract certain 6 different columns from a many files and write it
> to 6 separate output files.
>
> #!/usr/bin/env python
> from sys import argv
> lst_files=argv[1:]
>
> sh=[];st=[];sta=[];buc=[];pro=[];ope=[]
Hi,
I have to extract say column 1, column 2 . column 6 (six different
columns) from 10 different input files. The function "extract" to extract
the columns works fine. For each column extracted from the input files, i
have to write it in one output file. I have to make 6 output files
corresp
On Thu, Feb 19, 2009 at 5:41 AM, Bala subramanian
wrote:
> Dear friends,
>
> I want to extract certain 6 different columns from a many files and write it
> to 6 separate output files. I took some help from the following link
>
> http://mail.python.org/pipermail/tutor/2004-November/033475.html
>
>
Dear friends,
I want to extract certain 6 different columns from a many files and write it
to 6 separate output files. I took some help from the following link
http://mail.python.org/pipermail/tutor/2004-November/033475.html
to write one column from many input files to a particular output file.
12 matches
Mail list logo