ipython

Miscellaneous ipython cfg options

You put those in ~/.ipython/profile_default/ipython_config.py

c.InteractiveShellApp.extensions = ['autoreload']
c.InteractiveShellApp.exec_lines = ['%autoreload 2']
c.InteractiveShellApp.exec_lines.append('print("Warning: disable autoreload in ipython_config.py to improve performance.")')

c.PlainTextFormatter.max_width = 171
#numpy formatting
np.set_printoptions(linewidth=174,threshold=10000,precision=3)

ff = lambda x: "%.3f" % x 
np.set_printoptions(formatter={'float_kind':ff})

import pandas as pd
# Use 3 decimal places in output display
pd.set_option("display.precision", 3)

# Don't wrap repr(DataFrame) across additional lines
pd.set_option("display.expand_frame_repr", False)

# Set max rows displayed in output to xxx
pd.set_option("display.max_rows", 174)

Ignore warnings in ipython

In  ~/.ipython/profile_default/startup/disable-warnings.py, put this :

import warnings
warnings.filterwarnings('ignore')

If you want to see warnings only once then do this :

warnings.filterwarnings('once')