Python Forum

Full Version: Text to column pandas
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi - I have a cvs file that has the below format. How do I apply text to column to the second column so that the data is broken out in separate columns as shown in the Expected Output.

Current Format
Name |ID | Header3
Person 1 |(‘Data’,Date of Birth’,’xyz’,’Friend’)| 1



Current Format
Name |ID | Header3
Person 1 |(‘Data’,Date of Birth’,’xyz’,’Friend’)| 1


Expected Outout
Name |Type|Metric |Code|Relation|Header3
Person 1 |Data|Date of Birth|xyz |Friend | 1

Any suggestions?