Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Text to column pandas
#1
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?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Find duplicates in a pandas dataframe list column on other rows Calab 2 2,177 Sep-18-2024, 07:38 PM
Last Post: Calab
  Find strings by index from a list of indexes in a different Pandas dataframe column Calab 3 1,627 Aug-26-2024, 04:52 PM
Last Post: Calab
  HTML Decoder pandas dataframe column mbrown009 3 2,685 Sep-29-2023, 05:56 PM
Last Post: deanhystad
  Make unique id in vectorized way based on text data column with similarity scoring ill8 0 1,452 Dec-12-2022, 03:22 AM
Last Post: ill8
  pandas column percentile nuncio 7 4,552 Aug-10-2022, 04:41 AM
Last Post: nuncio
  pandas: Compute the % of the unique values in a column JaneTan 1 2,420 Oct-25-2021, 07:55 PM
Last Post: jefsummers
  Pandas Data frame column condition check based on length of the value aditi06 1 3,755 Jul-28-2021, 11:08 AM
Last Post: jefsummers
  How to move each team row to a new column. Pandas vladiwnl 0 2,117 Jun-13-2021, 08:10 AM
Last Post: vladiwnl
  iretate over columns in df and calculate euclidean distance with one column in pandas Pit292 0 4,374 May-09-2021, 06:46 PM
Last Post: Pit292
Question Pandas - Creating additional column in dataframe from another column Azureaus 2 3,882 Jan-11-2021, 09:53 PM
Last Post: Azureaus

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020