从终端执行代码时出现以下错误:
AttributeError: module 'pandas' has no attribute 'Series'
根据此代码:
import pandas
numbers = {1,2,3,4,5}
ser = pandas.Series(list(numbers))
print(ser)
但同样的代码在IDE中也可以正常工作
Python 3.6.2 (v3.6.2:5fd33b5, Jul 8 2017, 04:57:36) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pandas
>>> numbers = {1,2,3,4,5}
>>> ser = pandas.Series(list(numbers))
>>> ser
0 1
1 2
2 3
3 4
4 5
dtype: int64
你知道吗搜索路径地址:
['C:\\Users\\norman.khine\\Documents\\CodeCommit\\sysadmin\\scripts', 'C:\\Python36\\python36.zip', 'C:\\Python36\\DLLs', 'C:\\Python36\\lib', 'C:\\Python36', 'C:\\Users\\norman.khine\\AppData\\Roaming\\Python\\Python36\\site-packages', 'C:\\Python36\\lib\\site-packages', 'C:\\Python36\\lib\\site-packages\\whois-0.1-py3.6.egg']
所有其他模块导入正确!你知道吗
有什么帮助吗?你知道吗
将脚本名称更改为
ssl.py
以外的名称可以解决此问题。你知道吗相关问题 更多 >
编程相关推荐