Skip to content

Commit e487a30

Browse files
committed
Merge pull request #8407 from cstoafer/docs
Added a section to FAQ Docs about startup scripts for setting up pandas based on issue #5748.
2 parents 9b63bfc + f80b7fe commit e487a30

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

doc/source/faq.rst

+22
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,28 @@ Monkey-patching existing methods is usually a bad idea in that respect.
6565
When used with proper care, however, it's a very useful tool to have.
6666

6767

68+
.. _ref-python-startup:
69+
70+
Setting startup options for pandas in python/ipython environment
71+
----------------------------------------------------------------
72+
73+
Using startup scripts for the python/ipython environment to import pandas and set options makes working with pandas more efficient. To do this, create a .py or .ipy script in the startup directory of the desired profile. An example where the startup folder is in a default ipython profile can be found at:
74+
75+
.. code-block:: python
76+
77+
$IPYTHONDIR/profile_default/startup
78+
79+
More information can be found in the `ipython profile documentation
80+
<http://ipython.org/ipython-doc/1/config/overview.html>`__. An example startup script for pandas is displayed below:
81+
82+
.. code-block:: python
83+
84+
import pandas as pd
85+
pd.set_option('display.max_rows', 999)
86+
pd.set_option('precision', 5)
87+
88+
For a list of options available for pandas, see the :ref:`pandas options documentation <options>`.
89+
6890
.. _ref-scikits-migration:
6991

7092
Migrating from scikits.timeseries to pandas >= 0.8.0

doc/source/options.rst

+2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ pandas namespace. To change an option, call ``set_option('option regex', new_va
8686
pd.set_option('mode.sim_interactive', True)
8787
pd.get_option('mode.sim_interactive')
8888
89+
**Note:** that the option 'mode.sim_interactive' is mostly used for debugging purposes.
90+
8991
All options also have a default value, and you can use ``reset_option`` to do just that:
9092

9193
.. ipython:: python

0 commit comments

Comments
 (0)