【问题标题】:How to print an entire data frame in R on a Jupyter Notebook? [duplicate]如何在 Jupyter Notebook 上打印 R 中的整个数据框? [复制]
【发布时间】:2020-07-24 19:48:33
【问题描述】:

无论我做什么(例如,只调用数据框 dfprint(df)df[1:nrow(df),] 我都会在打印输出中得到垂直点跳过行:

网站上有关于RStudio的类似问题,建议View()。但是,Jupyter Notebook 不支持此功能(具体来说,我使用的是 Google Colab)。

我对 R(或 R 包)中的调用或函数感兴趣,以便独立于我可能使用的 IDE 或平台来执行此操作。

【问题讨论】:

  • 尝试使用 Anaconda。对于某些功能,Google Colab 和 Jupyter Notebook 的工作方式不同。
  • 尝试更改打印选项,例如options(repr.matrix.max.rows=1000),看看会发生什么

标签: r dataframe


【解决方案1】:

我认为您想要的选项是repr.matrix.max.rowsrepr.matrix.max.cols

尝试运行这个:

options(repr.matrix.max.rows=600, repr.matrix.max.cols=200)

默认值为 60 和 20。

链接:https://github.com/IRkernel/IRkernel/issues/470

【讨论】:

    猜你喜欢
    • 2018-08-25
    • 2018-09-28
    • 1970-01-01
    • 1970-01-01
    • 2017-11-25
    • 1970-01-01
    • 2022-01-09
    • 2021-03-28
    • 1970-01-01
    相关资源
    最近更新 更多