Python: Pandas dataframe from Series of dict

后端 未结 2 1985
误落风尘
误落风尘 2020-11-29 10:23

I have a Pandas dataframe:

type(original)
pandas.core.frame.DataFrame

which includes the series object original[\'user\']:

2条回答
  •  春和景丽
    2020-11-29 10:53

    what I would try to do is the following:

    new_df = pd.DataFrame(list(original['user']))
    

    this will convert the series to list then pass it to pandas dataframe and it should take care of the rest.

提交回复
热议问题