在使用 jupyter notebook 时如何在 pandas 中使用 Dataframe 时查看完整数据? [复制]

Posted

技术标签:

【中文标题】在使用 jupyter notebook 时如何在 pandas 中使用 Dataframe 时查看完整数据? [复制]【英文标题】:How to view full data when using Dataframe in pandas while using jupyternotebook? [duplicate] 【发布时间】:2021-10-12 21:16:32 【问题描述】:

而不是在打开数据框时使用 ....(dot dot) 视图,如何访问或查看 Jupyter 笔记本中的所有值。 reference image

【问题讨论】:

【参考方案1】:

您可以在 pandas 中设置“display.max_rows”选项:pd.set_option('display.max_rows', None)pd.set_option('display.max_rows', LARGE_NUMBER)

要临时设置它,请使用上下文管理器:

with pd.option_context('display.max_rows', None):
    print(df)

【讨论】:

以上是关于在使用 jupyter notebook 时如何在 pandas 中使用 Dataframe 时查看完整数据? [复制]的主要内容,如果未能解决你的问题,请参考以下文章