I have a dataframe of five columns where three of these columns contain lists of multiple values, which are ("Long", "Lat", Time_stamp"). Note that all ("Long", "Lat", Time_stamp") columns as object data-type.
Rather than storing multiple values in a cell, I'd like to split these values of the three columns into new three columns with including each lists element, so that each item in these lists gets its own rows (with the same values in all other columns( index and car_id). So the output I am looking for is as follows :
index | car_id | Long | Lat | Time_stamp |
---|---|---|---|---|
0 | 8919 | 108.99553 | 34.27859 | 1539041301 |
0 | 8919 | 108.99552 | 34.27822 | 1539041304 |
0 | 8919 | 108.99552 | 34.27786 | 1539041307 |
0 | 8919 | 108.99552 | 34.27748 | 1539041310 |
1 | 19785 | 108.9665 | 34.20515 | 1539014039 |
1 | 19785 | 108.9665 | 34.20543 | 1539014042 |
1 | 19785 | 108.9665 | 34.20572 | 1539014046 |
1 | 19785 | 108.9665 | 34.20602 | 1539014049 |
And so on.....
Thank you for your help....