[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\******\AppData\Local\Programs\Python\Python35-32\lib\idlelib\rpc.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、要深入学习。

posted @ 2017-07-25 10:47  viphhs  阅读(577)  评论(0编辑  收藏  举报