我在Jupyter Lab中使用pandas 0.25.1,无论pd.options.display.max_rows设置什么,我最多可以显示10行。
但是,如果pd.options.display.max_rows设置为小于10,则它将生效,pd.options.display.max_rows = None然后显示所有行。
知道如何让pd.options.display.max_rows超过10的A生效吗?
Tre*_*ney 44
pandas v0.25.1max_rows大于DataFrame.min_rows大于 10。max_rows是200和min_rows是20,会显示头部10,尾部10。max_rows是200和min_rowsis None,会显示头部100,尾部100。这两个pd.set_option('display.max_rows', x)和pd.options.display.max_rows = x(其中x是一些数),应该工作。
Jupyter Labpandas选项:pd.set_option('display.max_columns', 200)
pd.set_option('display.max_rows', 100)
pd.set_option('display.min_rows', 100)
pd.set_option('display.expand_frame_repr', True)
Run Code Online (Sandbox Code Playgroud)
get.options 返回当前值:pd.get_option("display.max_rows")
Run Code Online (Sandbox Code Playgroud)
DataFrame.pd.set_option('display.max_rows', 100),但DataFrame有 200 行,则只会显示 10 行。pd.set_option('display.max_rows', 200),但DataFrame有 100 行,则将显示所有 100。display.max_rows:默认= 60display.min_rows:默认= 10display.large_repr: 默认=截断max_rows/ 的DataFrames max_cols,repr(和 HTML repr)可以显示一个截断的表格(默认),或者切换到视图df.info()(在早期版本的 Pandas 中的行为)。允许的设置,['truncate', 'info']| 归档时间: |
|
| 查看次数: |
551 次 |
| 最近记录: |