Skip to content

Added a section to FAQ Docs about startup scripts for setting up pandas based on issue #5748. #8407

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 27, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions doc/source/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,28 @@ Monkey-patching existing methods is usually a bad idea in that respect.
When used with proper care, however, it's a very useful tool to have.


.. _ref-python-startup:

Setting startup options for pandas in python/ipython environment
----------------------------------------------------------------

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:

.. code-block:: python

$IPYTHONDIR/profile_default/startup

More information can be found in the `ipython profile documentation
<http://ipython.org/ipython-doc/1/config/overview.html>`__. An example startup script for pandas is displayed below:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you link here to the latest stable docs? (instead of version 1)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

didn't even notice that!

@cstoafer can you do a followup PR to fix this? (and comment on moving this section to options.rst)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry about that. The most relevant documentation I found in the stable
docs is:
http://ipython.org/ipython-doc/stable/interactive/tutorial.html#startup-files.
Should I link to that?

On Mon, Sep 29, 2014 at 10:57 AM, jreback [email protected] wrote:

In doc/source/faq.rst:

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

+.. _ref-python-startup:
+
+Setting startup options for pandas in python/ipython environment
+----------------------------------------------------------------
+
+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:
+
+.. code-block:: python
+

  • $IPYTHONDIR/profile_default/startup

+More information can be found in the ipython profile documentation +<http://ipython.org/ipython-doc/1/config/overview.html>__. An example startup script for pandas is displayed below:

didn't even notice that!

@cstoafer https://github.com/cstoafer can you do a followup PR to fix
this? (and comment on moving this section to options.rst)


Reply to this email directly or view it on GitHub
https://github.com/pydata/pandas/pull/8407/files#r18159059.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cstoafer yes that link looks good

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yep, that looks good

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since my previous PR was accepted should I just submit a new PR? Or should
I rebase the commits on my branch (which I am not familiar with doing)?
Thanks for your help.

On Mon, Sep 29, 2014 at 11:12 AM, Joris Van den Bossche <
[email protected]> wrote:

In doc/source/faq.rst:

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

+.. _ref-python-startup:
+
+Setting startup options for pandas in python/ipython environment
+----------------------------------------------------------------
+
+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:
+
+.. code-block:: python
+

  • $IPYTHONDIR/profile_default/startup

+More information can be found in the ipython profile documentation +<http://ipython.org/ipython-doc/1/config/overview.html>__. An example startup script for pandas is displayed below:

yep, that looks good


Reply to this email directly or view it on GitHub
https://github.com/pydata/pandas/pull/8407/files#r18160388.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cstoafer no pls make a new PR. Once merged, we don't touch these anymore.


.. code-block:: python

import pandas as pd
pd.set_option('display.max_rows', 999)
pd.set_option('precision', 5)

For a list of options available for pandas, see the :ref:`pandas options documentation <options>`.

.. _ref-scikits-migration:

Migrating from scikits.timeseries to pandas >= 0.8.0
Expand Down
2 changes: 2 additions & 0 deletions doc/source/options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ pandas namespace. To change an option, call ``set_option('option regex', new_va
pd.set_option('mode.sim_interactive', True)
pd.get_option('mode.sim_interactive')

**Note:** that the option 'mode.sim_interactive' is mostly used for debugging purposes.

All options also have a default value, and you can use ``reset_option`` to do just that:

.. ipython:: python
Expand Down