【问题标题】:Why can't I see all the columns in Jupyter notebook?为什么我看不到 Jupyter notebook 中的所有列?
【发布时间】:2019-11-04 02:41:40
【问题描述】:

我在 Jupyter lab 0.35.5 中展示了一个 pandas df,其中

pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 1000)` 

但我看不到右侧的列,没有滚动条(见图)。如何让它们显示?

TIA!

【问题讨论】:

  • 试试pd.options.display.max_columns = 500
  • 谢谢。同样的问题。

标签: python-3.x pandas jupyter-notebook jupyter-lab


【解决方案1】:

试试这个

import pandas as pd
from IPython.display import display

pd.options.display.max_columns = None
display(data)

启用滚动:

You can try Cell -> Current Outputs -> Toggle Scrolling in the Jupyter UI to enable the scrolling for the output of one cell.

【讨论】:

    猜你喜欢
    • 2019-06-16
    • 1970-01-01
    • 1970-01-01
    • 2020-03-11
    • 1970-01-01
    • 2023-03-11
    • 2019-06-06
    • 1970-01-01
    • 2021-07-12
    相关资源
    最近更新 更多