AttributeError: partially initialized module ‘pandas’ has no attribute ‘set_option’ (most likely due to a circular import)
AttributeError:部分初始化的模块“pandas”没有属性“set_option”(很可能是由于循环导入)

Traceback (most recent call last):
  File "E:\Temporary\pythonProject\数据可视化\pandas.py", line 2, in <module>
    import pandas as pd
  File "E:\Temporary\pythonProject\数据可视化\pandas.py", line 4, in <module>
    pd.set_option('display.unicode.east_asian_width', True)
AttributeError: partially initialized module 'pandas' has no attribute 'set_option' (most likely due to a circular import)

在这里插入图片描述

解决方案
最有可能的是,您的python脚本的名称是’pandas.py‘,这将导致循环导入,更换脚本名称

在这里插入图片描述

Logo

北京人形旗下天工造物具身智能开源社区,聚焦具身天工与慧思开物两大平台

更多推荐