Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 16595

Transpose within Transpose Notepad++?

$
0
0

I have a text file that looks like this (but 132k lines)

********name : onePlace : cityInitial: none********name : twoPlace : city2Initial: none********name : threePlace : city3Initial: noneLimits : some

I'm trying to move it into a more friendly format (excel/database records). Each 'record' is separated by the ********, the fields for 90% of the records are all the same, but some have additional fields, like the limits in the 3rd record.

I would like a csv, or similar output like:

name,place,initial,limitone,city,none,n/atwo,city2,none,n/athree,city3,none,some

Is python better suited for parsing and manipulating this?


Viewing all articles
Browse latest Browse all 16595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>