Dataframe not showing in Pycharm

后端 未结 10 1339
旧时难觅i
旧时难觅i 2020-12-30 18:09

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

相关标签:
10条回答
  • 2020-12-30 18:48

    As you said in your edit, there's a limit on the number of columns (on my PC though it's far less than 15). However, you can see the whole thing by typing:

    df.values
    

    It will show you the whole dataframe, but without the names of the columns.


    Edit:

    To show the column names as well:

    np.vstack([df.columns, df.values])
    
    0 讨论(0)
  • 2020-12-30 18:52

    I use PyCharm 2019.1.1 (Community Edition) and I run Python 3.7. When I first click on "View as DataFrame" there seems to be the same issue, but if I wait a few second the content pops up. For me it is a matter of loading.

    0 讨论(0)
  • 2020-12-30 18:52

    In my situation, the problem is caused by two same cloumn name in my dataframe. Check it by:df.columns.shape[0] == len(set(df.columns))

    0 讨论(0)
  • 2020-12-30 18:53

    This might be helpful for some people experiencing similar problem:

    As of August 2019 SciView in PyCharm does struggle with displaying DataFrames that have contain nullable integer type, see issue on JetBrains

    0 讨论(0)
  • 2020-12-30 18:57

    I have met the same problems. I figured it was because of the special characters in column names (in my case) In my case, I have "%" in the column name, then it doesn't show the data in View as DataFrame function. After I remove it, everything was correctly shown. Please double check if you also have some special characters in the column names.

    0 讨论(0)
  • 2020-12-30 19:00

    I use PyCharm 2019.1.1 (Community Edition). And when I used right-click "View as DataFrame". I get the message: "Nothing to show".

    But when I click the object tail button "...View as DataFrame", it worked.

    I find out that my problem is my DataFrame Object is an Object's param. Right-click the "View as DataFrame" doesn't transfer the class name, need to user input the class's name and param's name.

    Hope can help somebody.

    0 讨论(0)
提交回复
热议问题