Showing posts with label jupyter. Show all posts
Showing posts with label jupyter. Show all posts

Wednesday, September 26, 2018

Pandas DataFrame Jupyter notebook display: increasing column width

To increase the column width when displaying a Pandas dataframe in Jupyter notebook, do this:

pd.set_option('display.max_colwidth', -1)

[Courtesy: this]

Friday, September 21, 2018

Jupyter-notebook: plot matplotlib graphs inline

To plot matplotlib graphs inline in Jupyter-notebook, do this:

import matplotlib.pyplot as plt
%matplotlib inline

Now, plt.plot(...) while show the graph inline.

Jupyter-notebook module reload

To reload modules being used in a jupyter-notebook (when they have been changed outside), do this:

%load_ext autoreload
%autoreload 2

This will automatically reload the module every time it is changed.

[Courtesy: this]