如何在带有 R 内核的 Jupyter 笔记本中查看数据帧的所有行? [英] How to see all rows of a data frame in a Jupyter notebook with an R kernel?

查看:15
本文介绍了如何在带有 R 内核的 Jupyter 笔记本中查看数据帧的所有行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我将一个数据框放入一个单元格时,它只显示了一些行,中间有一个...".

When I put a data frame into a cell, it shows only some of the rows, with a "..." in the middle.

编辑:我正在寻找这些 Python 笔记本调用的 R 等效项:

Edit: I'm looking for R equivalents of these Python notebook calls:

import pandas
# "If max_cols is exceeded, switch to truncate view"
pandas.set_option('display.max_columns', 5400)
# "The maximum width in characters of a column"
pandas.set_option('display.max_colwidth', 500)

另见http://pandas.pydata.org/pandas-docs/stable/generated/pandas.set_option.html.

推荐答案

Thomas Kluyver :

Thomas Kluyver says:

我认为你想要的选项是 repr.matrix.max.rows 和repr.matrix.max.cols

I think the options you want are repr.matrix.max.rows and repr.matrix.max.cols

即运行

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

默认值为 60 和 20.

The defaults are 60 and 20.

这篇关于如何在带有 R 内核的 Jupyter 笔记本中查看数据帧的所有行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆