報錯代碼
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刪除。