How to reorganize CSV files with Python? Mine looks like this:
.......................<BR>
1987
martin
2012-01-16
1976
roger<BR>
1987
martin
2012-01-17
1979
michael<BR>
1969
maria
2012-01-26
1979
michael<BR>
......................................
These represent the birth year on top and the name underneath. In between is the date they established contact with each other. There are also some empty rows in between the blocks.
Each 5-row block represents two persons and that they have contacted other. So basically each 5-row block is two NODES and a LINK between them.
I would like to import this in Gephi, and thereby the CSV files need to be reorganized. Maybe as GEXF (Graph Exchange XML Format). Otherwise simply CSV like this would be OK:
................................<BR>
Source;Target;Label<BR>
1987 martin;1976 roger;"2012-01-16"<BR>
1987 martin;1979 michael;"2012-01-17"<BR>
And so on. How do I process the CSV to look like the above?