12

I am using Try Jupyter! https://try.jupyter.org/

I have following R code to display data (120 rows).

require(plyr)

seed=42
blocksize = 4
N = 120
set.seed(seed)
block = rep(1:ceiling(N/blocksize), each = blocksize)
a1 = data.frame(block, rand=runif(length(block)), envelope= 1: length(block))
a2 = a1[order(a1$block,a1$rand),]
a2$arm = rep(c("Arm 1", "Arm 2"),times = length(block)/2)
assign = a2[order(a2$envelope),]

head(assign,120)

How can I display all details of data instead of having these dots ( ... ) between rows in the middle? enter image description here

When I tried this R script at my local server, I only got 30 rows of data and break of rows was between 8 and 23.

I was reading other question on Stackoverflow, and it mentioned about Pandas series.

I am not sure how this case could be related to Pandas (since I did not use any Python directly here).

My question is where do I change so that it would display all rows? (in local server or possibly at https://try.jupyter.org/ as well)

Do I have execute Python script to server?

Java
  • 1,208
  • 3
  • 15
  • 29

4 Answers4

19
pd.options.display.max_rows = 999
TomDotTom
  • 6,238
  • 3
  • 41
  • 39
4

to have no limit for one dataframe df:

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

otherwise

pd.options.display.max_rows = None

as suggested in a previous comment

cookiemonster
  • 1,315
  • 12
  • 19
1

Code:

from IPython.display import display, HTML

display(HTML(df.to_html()))
ofirule
  • 4,233
  • 2
  • 26
  • 40
Elton da Mata
  • 181
  • 1
  • 6
0

I have to add this line on the top. For example (600 and 200).

options(repr.matrix.max.rows=600, repr.matrix.max.cols=200)
Stefan
  • 1,697
  • 15
  • 31
Java
  • 1,208
  • 3
  • 15
  • 29