Pycharm jupyter notebook: Disable table output rendering

Dear all,

I am using the educational version of pycharm. When using jupyter Notebook, the tables look lie this:

I'd instead like the tall outputs of cells to be handled/displayed like they are in Jupyter Notebook:

WHY do I want that: 

The Pycharm Tables don't show all items. I configured:

`pd.options.display.max_rows = 200
pd.options.display.max_columns = 200`

Instead of scrolling, I have to click through the different pages of the table.

Similar behaviour occurs for pandas series.

 

Is there any way to handle jupyter outputs like jupyter notebook does?

 

Thanks a lot!

1

Hi @Elias-koenig!

Does it help to change page size ?

1

Hi Mikhail Tarabrikov 

 

Thanks for your answer. I already found that option, but I'd still prefer the outputs to look&behave the same, like they do in jupyter notebook.

 

Cheers

Elias

0

Elias-koenig , I am afraid, this is not configurable, although you still can open the notebook in browser:

1

I would also very much like a feature that would allow switching between PyCharm's custom dataframe viewer and the default Jupyter HTML view. I have encountered many scenarios in the past year of using PyCharm professionally where this feature would have been helpful. 

As a workaround, I wrote a small function that overrides PyCharm's display:

from IPython.display import display, HTML

def disp_df(df, *, full=False):
    """Display a DataFrame using simple HTML.

    This also helps avoid PyCharm's custom dataframe display and simply uses HTML.
    """
    if full:
        df_html = df.to_html()
    else:
        df_html = df._repr_html_()
    df_html = df_html.replace('class="dataframe"', 'class="table"').replace('.dataframe', '.table')
    display(HTML(df_html))

Removing the references to the “dataframe” class in the HTML seems to do the trick. Please keep in mind that I haven't tested it thoroughly. 

0

请先登录再写评论。