报错代码
s = pd.Series([[1, 2, 3], 'foo', [], [3, 4]])
s
0 [1, 2, 3]
1 foo
2 []
3 [3, 4]
dtype: object
s.explode()
AttributeError: 'Series' object has no attribute 'explode'
解决: 升级pandas至0.25以及以上版本
报错代码
s = pd.Series([[1, 2, 3], 'foo', [], [3, 4]])
s
0 [1, 2, 3]
1 foo
2 []
3 [3, 4]
dtype: object
s.explode()
AttributeError: 'Series' object has no attribute 'explode'
解决: 升级pandas至0.25以及以上版本
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。