0

i am trying to do this in python for 2 day but i have been unsuccessful.

Table:

enter image description here

Desired Output:

enter image description here

Thank you for any help!!

J. Scott Elblein
  • 4,013
  • 15
  • 58
  • 94
  • Welcome to SO! Please take a moment to read about how to post pandas questions: http://stackoverflow.com/questions/20109391/how-to-make-good-reproducible-pandas-examples – YOLO Jan 28 '20 at 16:33

1 Answers1

1

Here is something that might help: https://www.geeksforgeeks.org/python-pandas-split-strings-into-two-list-columns-using-str-split/ (Specifically Example #2)

For reordering columns, have a look at this: https://stackoverflow.com/a/32131398/2566205

synaptikon
  • 699
  • 1
  • 8
  • 16
  • Thank you for the answer. I managed to split the column ,but i am still having a problem with my output. I need to change the order of what is written in the cell. EX:'Elaboração e Normatização,Planejada' to 'Planejada, , , ,Elaboração e Normatização – Lucas Juca Jan 29 '20 at 13:41
  • that would require joining back in a different order. If you split your column into a list (with a comma delimiter), you might be able to join such that last element comes first. Something to help: https://stackoverflow.com/questions/19377969/combine-two-columns-of-text-in-dataframe-in-pandas-python – synaptikon Jan 29 '20 at 18:18