Converting Series of lists into DataFrame in Pandas
Start your free 7-days trial now!
Consider the following Series with some lists:
s = pd.Series([[3,4],[5,6]])s0 [3, 4]1 [5, 6]dtype: object
To horizontally expand the lists and convert the Series into a DataFrame:
We first convert the Series into a Python standard list using
[[3, 4], [5, 6]]
We then pass this list of values into the