[IT学习]Python pandas 学习

今天学习pandas来处理数据,结果用python 3.5.0的shell来调试,总是报错。

报错中包含如下字样:

Traceback (most recent call last):
File "<pyshell#17>", line 1, in <module>
pd.DataFrame(a)
File "C:Users******AppDataLocalProgramsPythonPython35-32libidlelib pc.py", line 611, in displayhook
text = repr(value)

。。。。

AttributeError: 'NoneType' object has no attribute 'fileno'

后来搜索“line 611, in displayhook”找到这个帖子:

https://stackoverflow.com/questions/44506902/dtypes-returning-attributeerror

里面提到“You seem to be using IDLE. Try not using IDLE.”

结果按照这个建议改了下,就得到了结果了。

背后的原因尚不得而知。

【经验】

1、刚开始只是搜索了最后的“报错”,其实要尽量提供更多的最开始的报错来尝试搜索。

2、要深入学习。

原文地址:https://www.cnblogs.com/viphhs/p/7232796.html