|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
刚开始学习pandas库的使用,结果第一步就卡住了,在CSDN上也没有找到解决办法,求大佬们指点
import pandas as pd
df = pd.read_csv('Stu_Info\Stu_Info.csv')
print(df)
然后就出现了以下的报错:
Traceback (most recent call last):
File "E:/FYP/Week 4/copy.py", line 1, in <module>
import pandas as pd
File "D:\Python37\lib\site-packages\pandas\__init__.py", line 54, in <module>
from pandas.core.api import (
File "D:\Python37\lib\site-packages\pandas\core\api.py", line 29, in <module>
from pandas.core.groupby import Grouper, NamedAgg
File "D:\Python37\lib\site-packages\pandas\core\groupby\__init__.py", line 1, in <module>
from pandas.core.groupby.generic import DataFrameGroupBy, NamedAgg, SeriesGroupBy
File "D:\Python37\lib\site-packages\pandas\core\groupby\generic.py", line 9, in <module>
import copy
File "E:\FYP\Week 4\copy.py", line 3, in <module>
df = pd.read_csv('Stu_Info\Stu_Info.csv')
AttributeError: module 'pandas' has no attribute 'read_csv'
你的源代码不要命名为copy.py,跟内置库重名了。
|
|