How to avoid output into scrollable frames in jupyter notebook?
Solution 1
To disable auto-scrolling, execute this javascript in a notebook cell before other cells are executed:
%%javascript
IPython.OutputArea.prototype._should_scroll = function(lines) {
return false;
}
There is also a jupyter notebook extension, autoscroll, you can use for a nicer UI.
Solution 2
You can just use mouse to click on the outside of the output Frame to toggle between scrolling, it worked for me. More precisely, you have to click the square to the left of your output (see image).
Single click will toggle scroll mode, double click will hide output completely.
Solution 3
I stumbled across the same problem, a scrollbar appeared for outputs out of nowhere.
Just go to- Cell > All Outputs > Toggle Scrolling (On the Menu Bar) and outputs will go back to no scrolling.
Related videos on Youtube
Dims
Software developer & Machine Learning engineer C/C++/Java/C#/Python/Mathematica/MATLAB/Kotlin/R/PHP/JavaScript/SQL/HTML/ LinkedIn: http://www.linkedin.com/in/dimskraft Telegram: https://t.me/dims12 I prefer fishing rod over fish.
Updated on May 28, 2021Comments
-
Dims almost 3 years
Suddenly, output for statements started to appear inside scrollable frames.
I was playing with only one parameter
pd.options.display.max_rows = 1000
but after experiments, I commented this line out and restarted the kernel.
Nevertheless, one of my outputs appears inside frame.
How to avoid this?
-
Nickil Maveli over 7 yearsDoes resetting this to default by
pd.reset_option("display.max_rows")
help? -
Dims over 7 yearsHow can this affect if I restarted kernel?
-
Dims over 7 yearsNo it didn't help.
-
Randy over 7 years
pd.options.displays.max_rows
just controls whenpandas
truncates output with a...
. Scrollable frames are a part of Jupyter when the output for a given cell is long.
-
-
Jianyu about 4 yearsIs there a way to ENABLE auto-scrolling again after disabling using this javascript?
-
mtd almost 4 years@Jianyu to ENABLE, you could just change
return false
toreturn true
-
Peter Moore almost 4 yearsThis also worked for me. Its not obvious. Clicking on the out sidebar toggles the scrollbar for that frame.
-
U2647 over 3 yearsThis is a very smart solution! You don't need to change any settings of Notebook!