I have a data unformatted like below in a pandas dataframe. The 3rd row is supposed to be split in 3 columns. But it is added in col1. I have read this data from an excel file.
Col1 Col2 Col3
0.500L PET X12 1.0L PET X12
0.250L RGB X12 0.330L RGB X12
0.330L CAN X24, 0.330L CAN X10, 0.330L CAN X12,
What is the best method to get this data formatted as below?
Col1 Col2 Col3
0.500L PET X12 1.0L PET X12
0.250L RGB X12 0.330L RGB X12
0.330L CAN X24 0.330L CAN X10 0.330L CAN X12,
Right now str.split combined with fillna for each col i used. As the dataframe has around 20 columns to combine. I am looking for an alternate method if any.