How to print an entire data frame in R on a Jupyter Notebook?

Viewed 1464

No matter what I do (e.g. just calling the dataframe df or print(df) or df[1:nrow(df),] I get vertical dots in the printout skipping rows:

enter image description here

There are similar questions on the site about RStudio, and suggestion View(). However, this function is not supported in Jupyter Notebook (specifically, I am using Google Colab).

I am interested in a call or function within R (or R package) to do this independent of the IDE or platform I may be using.

1 Answers

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

Try to run this:

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

The defaults are 60 and 20.

Link: https://github.com/IRkernel/IRkernel/issues/470

Related