数据框未显示在Pycharm中 [英] Dataframe not showing in Pycharm

查看:403
本文介绍了数据框未显示在Pycharm中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用PyCharm 2016.2.1.当我尝试通过调试器中新添加的功能'View as DataFrame'查看Pandas数据帧时,这对于小型(例如4x4)DataFrame来说可以正常工作.

I am using PyCharm 2016.2.1 . When I try to view a Pandas dataframe through the newly added feature 'View as DataFrame' in the debugger, this works as expected for a small (e.g. 4x4) DataFrame.

但是,当我尝试查看约10,000行x〜50列的DataFrame(由自定义脚本生成)时,我收到消息:无内容显示".

However when I try to view a DataFrame (generated by custom script) of ~10,000 rows x ~50 columns, I get the message: "Nothing to show".

当我在Spyder中运行相同的脚本(生成DataFrame)时,便能够查看它,因此,我很确定它不是我的脚本中的错误.

When I run the same script (that generates the DataFrame) in Spyder, I am able to view it, so I am pretty sure it's not an error in my script.

有人知道在PyCharm中可以查看的数据框是否有最大大小,是否有办法更改?

Does anyone know if there is a maximum size to the DataFrames that can be viewed in PyCharm, and if there is a way to change this?

似乎最大允许大小为1000 x 15,因为在某些情况下,它会被截断为该大小(当行数太大时,但是当列太多时,pycharm只会说什么也没显示") ).

It seems that the maximum size allowed is 1000 x 15 , as in some cases it gets truncated to this size (when the number of rows is too large, but when there are too many columns pycharm just says 'nothing to show').

还是,我想知道是否有一种方法可以增加通过DataFrame查看器查看的最大允许行和列.

Still, I would like to know if there is a way to increase the maximum allowed rows and columns viewable through the DataFrame viewer.

推荐答案

我遇到了与PyCharm 2018.2.2相同的问题.原因是Yunzhao提到了列名中有一个特殊字符.

I have faced the same problem with PyCharm 2018.2.2. The reason was having a special character in a column's name as mentioned by Yunzhao .

如果您将"R& D"列名更改为"RnD"将解决此问题.真奇怪,JetBrains两年多来没有解决这个问题.

If your having a column name like 'R&D' changing it to 'RnD' will fix the problem. It's really strange JetBrains hasn't solved this problem for over 2 years.

这篇关于数据框未显示在Pycharm中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆