Bottom Page

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?
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  sort values of a column pandas karlito 2 71 9 hours ago
Last Post: karlito
  Dropping a column from pandas dataframe marco_ita 6 528 Sep-07-2019, 08:36 AM
Last Post: marco_ita
  How to drop column in pandas SriMekala 3 396 Aug-26-2019, 06:36 PM
Last Post: snippsat
  Pandas Import CSV count between numerical values within 1 Column ptaylor520 3 209 Jul-16-2019, 08:13 AM
Last Post: ptaylor520
  How to use the excel filename as a value to populate new column, using Pandas? Dequanharrison 5 367 Jun-26-2019, 11:11 PM
Last Post: Dequanharrison
  pandas change row value an existing column with conditionals Gigux 1 291 Jun-22-2019, 08:04 PM
Last Post: Gigux
  Imported csv, column text converted to number but not summing Ecniv 4 274 Jun-21-2019, 02:03 PM
Last Post: Ecniv
  Can't read text file with pandas zinho 4 581 May-23-2019, 05:31 PM
Last Post: zinho
  How to delete column if entire column values are "nan" Sri 4 543 Apr-13-2019, 12:16 PM
Last Post: Sri
  Splitting values in column in a pandas dataframe based on a condition hey_arnold 1 1,412 Jul-24-2018, 02:18 PM
Last Post: hey_arnold

Forum Jump:


Users browsing this thread: 1 Guest(s)