![](/img/trans.png)
[英]partially initialized module 'pandas' has no attribute 'read_csv' (most likely due to a circular import)
[英]Partially initialized module 'pandas' has no attribute 'read_csv'
嘗試在 python 中運行以下命令(保持簡單),但出現一個奇怪的錯誤。
import pandas as pd
pd.read_csv('testdata.csv')
AttributeError: partially initialized module 'pandas' has no attribute 'read_csv' (most likely due to a circular import)
我已經嘗試過:
您的 Python 文件不能與您正在導入的 Python模塊同名。 將您的pandas.py
文件重命名為其他名稱,例如pandas_work.py
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.