[Tutor] get columns from txt file

susana moreno colomer susana_87 at hotmail.com
Thu Jul 12 17:10:21 CEST 2012


Hi!
It is attached on the email, called myprogram.txt
Thank you!
 



Subject: Re: [Tutor] get columns from txt file
From: dfjennings at gmail.com
Date: Thu, 12 Jul 2012 11:07:53 -0400
CC: tutor at python.org
To: susana_87 at hotmail.com




On Jul 12, 2012, at 10:55 AM, susana moreno colomer wrote:


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 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 one column, instead of six

Great! It sounds like you're almost there. Where's the code which works except that it puts the data all in one column?


Take care,
Don 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20120712/225c9488/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: myprogram.txt
URL: <http://mail.python.org/pipermail/tutor/attachments/20120712/225c9488/attachment-0001.txt>


More information about the Tutor mailing list