How do I transpose every line in a row to multiple columns?

34 views Asked by At

data table

From the screenshot you can see that the description column (third row from the right) has a long list of data in every single row, and they read like this in Excel:

Color: White
Style: Casual
Pattern Type: Plain
Details: Pocket
Top Type: Tee
Bottom Type: Track Shorts
Neckline: Round Neck

How can I use pandas to split this row such that I get a new column for Color, a new column for Style, a new column for Pattern Type, a new column for Details, etc. ?

Thank you for helping out.

I tried using Split() but I couldn't figure out what to call to indicate the data on the next row.

0

There are 0 answers