Pandas Split Multiple Columns Of Lists
A similar question has been answered here Pandas split column of lists into multiple columns However, the solution can only apply to a single column of list, how about if I have mu
Solution 1:
I found a solution while writing this question,
splits = [pd.DataFrame(df[col].tolist()).add_prefix(col) for col in df.columns]
clean_df = pd.concat(splits, axis=1)
Post a Comment for "Pandas Split Multiple Columns Of Lists"