4

I'm looking for a way to display all the rows and all the columns BY DEFAULT in Jupyter, without the ..., in specific in Jupyter Lab but possibly is something done the same way in Jupyter Notebook.

Sample of truncated dataframe in R in Jupyter

I already had this setting and wouldn't need to add options() like in many other posts. However, I needed to do a fresh install of my Linux Mint and lost it.

I'm not totally sure, but I think it was related with creating a startup script and increasing the values for both rows and columns or it could be something to add in the settings. My best finding was this:

Where can I put a startup script in Jupyter?

I DON'T need it for Pandas and I DON'T need it as an option in every cell I create.

krassowski
  • 13,598
  • 4
  • 60
  • 92
Gerlex
  • 53
  • 5
  • 1
    Does this answer your question? [How to see all rows of a data frame in a Jupyter notebook with an R kernel?](https://stackoverflow.com/questions/43383591/how-to-see-all-rows-of-a-data-frame-in-a-jupyter-notebook-with-an-r-kernel) – krassowski Jun 09 '21 at 14:47
  • 1
    Welcome to SO. You are right, the solution involves adding `options()` to the startup script. I linked to the canonical answer which describes what to put into `options()`. I do not know how to invoke a script specifying options on start-up. I would search with IRkernel phrase. – krassowski Jun 09 '21 at 14:51
  • Thanks for the inspiration @krassowski ! As jankatins points [here](https://github.com/IRkernel/IRkernel/issues/356), it's something that could be added to the `~/.Rprofile`. I didn't have it and created it like [here](https://stackoverflow.com/questions/17459353/cannot-locate-rprofile-file): `touch ~/.Rprofile` `open ~/.Rprofile` and just added the solution by @dfrankow without extra addition. Correct me if I'm wrong because it looks too simple, but I even restarted the kernel, cleaned output and restarted Linux and now the dataframes appear fully displayed in the cells. – Gerlex Jun 09 '21 at 17:58
  • 1
    Also found that `options(repr.matrix.max.rows=600, repr.matrix.max.cols=200)` affects all the cells. So, it could be something to run as first cell in the notebook making unnecessary to do all above, but in the end I consider is good to know about this small tweaks. – Gerlex Jun 09 '21 at 18:01

0 Answers0