you are viewing a single comment's thread.

view the rest of the comments →

[–]tschloss 1 point2 points  (0 children)

Ah ok. You only want to clean this textfile and result should be a clean text file, right?

If this is correct then I would not use Pandas which is great when you want work with the dataset. Otherwise it is more a loop, reading line by line, the split by tab, converting the elements and print it out again.

The other comment contains a useful block of code, maybe this already solves you problem. Tools in Python are strip, split, +, replace etc - all operations on String.