Split a column value to mutliple columns pandas /python -
I'm new to Python / Pandas and there is a data frame with two columns and one string is another. I'm looking to divide the contents of a column into multiple columns. Promote your information in this regard. This is my current dataframe content
Songtesty density 0 ["'Hof van commerce', '' Chance", SORETGR12AB ... 4.445323 1 ["-123 minutes. "," Try "," SOERGVA12A6D4FEC55 "] 3.854437 2 [" 10_000 crazy "," Please forgive us (LP Verses ... 3.57 9 846 3 ["1200 microgram", "Bliss", "SOKYOEA12AB018 .. 5.503 9 80 4 ["13 Cats", "Please Give Me Something", "SOYLO ... 2.964401 5 [" 16-bit Lolitas "," Tim Choice Break (intermez ... 5.564306 6 ["23 Skidoo" , "100 Dark", "SOTACCS12AB0185B85"] 5.572 99 7 ["2econd class citizen", "For this we have ... 3.756746 8 [" 2tall "," Display "," SOYYQZR12A8C144F9D "] 5.477224 The desired product is song, artist, song id, DENSITY will be found Song details in Bhajan columns.
For sample data, for example
song description DENSITY 8 ["2tall", "display", "SOYYQZR12A8C144F9D"] 5.472524 Song Artist Song Id DENSITY 2tall Performance SOYYQZR12A8C144F9D 5.477224 Thanks
After "text" "itemprop =" Text "> The following has worked for me:
In [275]: pd.DataFrame (data = list (DF ['song description']]. ), Column = ['Song', 'Artist', 'Song Id']) Out [275]: Song Artist Song No. 0 2tall Display SOYYQZR12A8C144F9D 1 2tall Display SOYYQZR12A8C144F9D To try: Pd.DataFrame (data = list (df ['Songdetails']. Value), column = ['SONG', 'ARTIST', 'SONG ID'])
Comments
Post a Comment