Python 如何将panda.series转换为数据帧

Python 如何将panda.series转换为数据帧,python,pandas,Python,Pandas,如何转换下面提到的pandas数据帧 dateint client_id reactions 20190821 heryi-789 [{count=1, name=hp, users=[xyz1]}] 20190821 ywie-234 [{count=1, name=art, users=[abc2]}, {count=1, name=wck, users=[xyz]}] 20190821

如何转换下面提到的pandas数据帧

dateint    client_id      reactions
20190821   heryi-789      [{count=1, name=hp, users=[xyz1]}]
20190821   ywie-234       [{count=1, name=art, users=[abc2]}, 
                           {count=1, name=wck, users=[xyz]}]
20190821   uiwo-238       [{count=6, name=rtf, users=[tst23, ert34, 
                            abc2]}]

我尝试将“反应”列值转换为dict,但是具有多个值的“用户”值不会转换为list

df['count'] = df['reactions'].apply(lambda x:x['count'])
df['name'] = df['reactions'].apply(lambda x:x['name'])
df['users'] = df['reactions'].apply(lambda x:x['users'])


然后使用
df['users'].explode()
如果您的反应柱的版本大于.25

反应柱的类型是什么?它是字符串、dict还是json?type(df['reactions'])-pandas.core.series.series我认为如果该字段的类型是dict,上面的代码就可以了。显示错误类型错误:字符串索引必须是整数您可以发布代码来创建演示数据帧吗?然后我会努力的
df['count'] = df['reactions'].apply(lambda x:x['count'])
df['name'] = df['reactions'].apply(lambda x:x['name'])
df['users'] = df['reactions'].apply(lambda x:x['users'])