Skip to content

DOC: added cookbook.rst to main docs #3036

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 2 commits into from
Mar 13, 2013
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
1 change: 1 addition & 0 deletions RELEASE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ pandas 0.11.0
**New features**

- New documentation section, ``10 Minutes to Pandas``
- New documentation section, ``Cookbook``
- Allow mixed dtypes (e.g ``float32/float64/int32/int16/int8``) to coexist in
DataFrames and propogate in operations
- Add function to pandas.io.data for retrieving stock index components from
Expand Down
85 changes: 85 additions & 0 deletions doc/source/cookbook.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
.. _cookbook:

.. currentmodule:: pandas

.. ipython:: python
:suppress:

import numpy as np
import random
import os
np.random.seed(123456)
from pandas import *
import pandas as pd
randn = np.random.randn
randint = np.random.randint
np.set_printoptions(precision=4, suppress=True)

********
Cookbook
********

This is a respository for *short and sweet* example and links for useful pandas recipes.
We encourage users to add to this documentation. This is a great *First Pull Request*.

Selection
---------
`Boolean Rows Indexing
<http://stackoverflow.com/questions/14725068/pandas-using-row-labels-in-boolean-indexing>`__

`Extending a panel along the minor axis
<http://stackoverflow.com/questions/15364050/extending-a-pandas-panel-frame-along-the-minor-axis>`__

`Prepending a level to a multiindex
<http://stackoverflow.com/questions/14744068/prepend-a-level-to-a-pandas-multiindex>`__

Grouping
--------

`Basic grouping with apply
<http://stackoverflow.com/questions/15322632/python-pandas-df-groupy-agg-column-reference-in-agg>`__

`Apply to different items in a group
<http://stackoverflow.com/questions/15262134/apply-different-functions-to-different-items-in-group-object-python-pandas>`__

`Replacing values with groupby means
<http://stackoverflow.com/questions/14760757/replacing-values-with-groupby-means>`__

`TimeGrouping of values grouped across time
<http://stackoverflow.com/questions/15297053/how-can-i-divide-single-values-of-a-dataframe-by-monthly-averages>`__

Merge
-----

Join
~~~~

`Joining a DataFrame to itself
<https://github.com/pydata/pandas/issues/2996>`__

Timeseries
----------

`Resample intraday frame without adding new days
<http://stackoverflow.com/questions/14898574/resample-intrday-pandas-dataframe-without-add-new-days>`__

Data In/Out
-----------

CSV
~~~

HDF5
~~~~

`Managing heteregenous data using a linked multiple table hierarchy
<https://github.com/pydata/pandas/issues/3032>`__

`Simple Queries with a Timestamp Index
<http://stackoverflow.com/questions/13926089/selecting-columns-from-pandas-hdfstore-table>`__

Miscellaneous
-------------

`Multi-index sorting
<http://stackoverflow.com/questions/14733871/mutli-index-sorting-in-pandas>`__
1 change: 1 addition & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ See the package overview for more detail about what's in the library.
faq
overview
10min
cookbook
dsintro
basics
indexing
Expand Down
3 changes: 3 additions & 0 deletions doc/source/v0.11.0.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ pay close attention to.
There is a new section in the documentation, :ref:`10 Minutes to Pandas <10min>`,
primarily geared to new users.

There is a new section in the documentation, :ref:`Cookbook <cookbook>`, a collection
of useful recipes in pandas (and that we want contributions!).

There are several libraries that are now :ref:`Recommended Dependencies <install.recommended_dependencies>`

Selection Choices
Expand Down