Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/334.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何解决熊猫的属性错误:“;属性错误:模块';熊猫';没有属性';StringDtype'&引用;?_Python_Pandas_Error Handling_Jupyter_Attributeerror - Fatal编程技术网

Python 如何解决熊猫的属性错误:“;属性错误:模块';熊猫';没有属性';StringDtype'&引用;?

Python 如何解决熊猫的属性错误:“;属性错误:模块';熊猫';没有属性';StringDtype'&引用;?,python,pandas,error-handling,jupyter,attributeerror,Python,Pandas,Error Handling,Jupyter,Attributeerror,pd.Series([“a”、“b”、“c”],dtype=pd.StringDtype()) AttributeError:模块“pandas”没有属性“StringDtype”您需要升级pandas,因为它是在pandas 1.0.0+中实现的: class.strindType 字符串数据的扩展数据类型 版本1.0.0中的新功能 啊,我以为OP使用的是Pyspark数据类型而不是Pandas(稍微有点打字错误),但我不知道这个新的数据类型很好。

pd.Series([“a”、“b”、“c”],dtype=pd.StringDtype())


AttributeError:模块“pandas”没有属性“StringDtype”

您需要升级pandas,因为它是在pandas 1.0.0+中实现的:

class.strindType
字符串数据的扩展数据类型

版本1.0.0中的新功能


啊,我以为OP使用的是Pyspark数据类型而不是Pandas(稍微有点打字错误),但我不知道这个新的数据类型很好。