Re: data manipulation

2008-05-01 Thread Jeff
The function expects an excel file. It cannot read a plain text file. You would need to figure out a way to convert the text file data into an excel format and save it to a new file first. The proper way to handle this is to make your data processing functions expect a defined format. Then, you

Re: Data Manipulation - Rows to Columns

2008-02-06 Thread bearophileHUGS
This is smells of homework. Here are few alternative solutions of mine that I don't like. I presume a good teacher will refuse them all, because no one of them uses the right tool :-) And every one of them has some small problem (even if they work here). data = """\ TABLE black blue red CHAIR yell

Re: Data Manipulation - Rows to Columns

2008-02-05 Thread Gabriel Genellina
En Wed, 06 Feb 2008 01:52:08 -0200, Gabriel Genellina <[EMAIL PROTECTED]> escribió: > I have a text file with marked up data that I need to convert into a > text tab separated file. Sorry, I sent the code too early: rows = [] row = None for line in file1: line = line.strip() # remove lead

Re: Data Manipulation - Rows to Columns

2008-02-05 Thread Gabriel Genellina
En Wed, 06 Feb 2008 00:54:49 -0200, Tess <[EMAIL PROTECTED]> escribió: > I have a text file with marked up data that I need to convert into a > text tab separated file. > > The structure of the input file is listed below (see file 1) and the > desired output file is below as well (see file 2). > >