pandas - ipython notebook startup file -


i have following startup in ~/.ipython/profile_default/startup location:

import sys, os sys.path.append(os.environ["pythonpath"]) import pandas pd pd.set_option("display.max_columns", 999) pd.set_option("display.max_rows", 999) pd.set_option("precision", 5) 

now reason pythonpath working pandas display options not. recommend try troubleshoot issue?

you can put following in ~/.ipython/profile_default/ipython_config.py file. automatically executes when start notebook in command line ipython notebook. options find useful:

# configuration file ipython.  c = get_config()  c.interactiveshellapp.exec_lines = [     'from __future__ import print_function, division',     '%matplotlib inline',     'import sys, os',     'sys.path.append(os.environ[\'pythonpath\'])',     'os.chdir(\'path/to/your/working/dir\')',         'import pandas pd',     'import numpy np',         'pd.options.display.notebook_repr_html = false',     'pd.options.display.max_rows = 20',     'pd.options.display.max_columns = 20',     'pd.options.display.expand_frame_repr = false',     'pd.options.display.max_colwidth = 28',     'pd.options.display.precision = 5',     'np.set_printoptions(precision=4, linewidth=90, threshold=25)',     'import datetime dt',     'import matplotlib.pyplot plt' ] c.notebookapp.notebook_dir = u'path/to/your/notebook/dir' c.ipythonwidget.font_size = 12 c.ipythonwidget.font_family = "ubuntu mono" c.zmqinteractiveshell.colors = "lightbg" 

Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -