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). > >

Data Manipulation - Rows to Columns

2008-02-05 Thread Tess
Hello All, 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). I am a complete novice with python and would appreciate any tips you ma