Tech, Cloud and Programming

Make your Jupyter Notebook/IPython full width

|

Lately i'm doing a lot of Data Engineering in Python. Using Jupyter Notebooks is great for quick development and visualisation. However the default width is limited nowadays with the widescreen monitors. Here are some ways to use the full width of your browser.

With HTMl magic

Cell:

%%html
<style>
.container { width:100% !important; }
</style>

With Python

Make sure you have the ipython library installed. pip install IPython

Cell:

from IPython.core.display import display, HTML
display(HTML("<style>.container { width:100% !important; }</style>"))

Jupyter Custom CSS

Create a file .jupyter/custom/custom.css with the content:

.container { width:100% !important; }

IPython Custom CSS

Create a file ~/.ipython/profile_default/static/css/custom.css with the content:

.container { width:100% !important; }

Note: path can change if you use conda or other virtual python environments.