joining rows

Beema shafreen beema.shafreen at gmail.com
Sat Dec 29 04:38:16 EST 2007


hi every body,

    I have two columns  in a file separted by tabs

If the column1 is common  in the  row1 and row2  then it should  be column 2
should be displayed in the single line.
eg:
col 1     col2
A            1
 A            2
 A            3
 B            1
  C           2
  D           3
  D           4
The result should be

A    1|2|3
B    1
C    2
D    3|4

What should I do to get my results
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20071229/62e901b3/attachment.html>


More information about the Python-list mailing list