Skip to content

Commit fadfd90

Browse files
committed
Merge pull request pandas-dev#3140 from jreback/cooker
DOC: cross reference cookbook and docs
2 parents 5816d0e + 8653bc7 commit fadfd90

File tree

8 files changed

+60
-0
lines changed

8 files changed

+60
-0
lines changed

doc/source/10min.rst

+2
Original file line numberDiff line numberDiff line change
@@ -600,6 +600,8 @@ the quarter end:
600600
Plotting
601601
--------
602602

603+
:ref:`Plotting <visualization>` docs.
604+
603605
.. ipython:: python
604606
:suppress:
605607

doc/source/cookbook.rst

+39
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,13 @@ We encourage users to add to this documentation.
2525
This is a great *First Pull Request* (to add interesting links and/or put short code inline
2626
for existing links)
2727

28+
.. _cookbook.selection:
29+
2830
Selection
2931
---------
32+
33+
The :ref:`indexing <indexing>` docs.
34+
3035
`Boolean Rows Indexing
3136
<http://stackoverflow.com/questions/14725068/pandas-using-row-labels-in-boolean-indexing>`__
3237

@@ -42,9 +47,13 @@ Selection
4247
`Selecting via the complement
4348
<http://stackoverflow.com/questions/14986510/picking-out-elements-based-on-complement-of-indices-in-python-pandas>`__
4449

50+
.. _cookbook.multi_index:
51+
4552
MultiIndexing
4653
-------------
4754

55+
The :ref:`multindexing <indexing.hierarchical>` docs.
56+
4857
`Creating a multi-index from a labeled frame
4958
<http://stackoverflow.com/questions/14916358/reshaping-dataframes-in-pandas-based-on-column-labels>`__
5059

@@ -75,9 +84,13 @@ Levels
7584
`Flatten Hierarchical columns
7685
<http://stackoverflow.com/questions/14507794/python-pandas-how-to-flatten-a-hierarchical-index-in-columns>`__
7786

87+
.. _cookbook.grouping:
88+
7889
Grouping
7990
--------
8091

92+
The :ref:`grouping <groupby>` docs.
93+
8194
`Basic grouping with apply
8295
<http://stackoverflow.com/questions/15322632/python-pandas-df-groupy-agg-column-reference-in-agg>`__
8396

@@ -123,9 +136,13 @@ Timeseries
123136
`Vectorized Lookup
124137
<http://stackoverflow.com/questions/13893227/vectorized-look-up-of-values-in-pandas-dataframe>`__
125138

139+
.. _cookbook.resample:
140+
126141
Resampling
127142
~~~~~~~~~~
128143

144+
The :ref:`Resample <timeseries.resampling>` docs.
145+
129146
`TimeGrouping of values grouped across time
130147
<http://stackoverflow.com/questions/15297053/how-can-i-divide-single-values-of-a-dataframe-by-monthly-averages>`__
131148

@@ -141,9 +158,13 @@ Resampling
141158
`Resample minute data
142159
<http://stackoverflow.com/questions/14861023/resampling-minute-data>`__
143160

161+
.. _cookbook.merge:
162+
144163
Merge
145164
-----
146165

166+
The :ref:`Concat <merging.concatenation>` docs. The :ref:`Join <merging.join>` docs.
167+
147168
`emulate R rbind
148169
<http://stackoverflow.com/questions/14988480/pandas-version-of-rbind>`__
149170

@@ -153,9 +174,13 @@ Merge
153174
`How to set the index and join
154175
<http://stackoverflow.com/questions/14341805/pandas-merge-pd-merge-how-to-set-the-index-and-join>`__
155176

177+
.. _cookbook.plotting:
178+
156179
Plotting
157180
--------
158181

182+
The :ref:`Plotting <visualization>` docs.
183+
159184
`Make Matplotlib look like R
160185
<http://stackoverflow.com/questions/14349055/making-matplotlib-graphs-look-like-r-by-default>`__
161186

@@ -165,9 +190,13 @@ Plotting
165190
Data In/Out
166191
-----------
167192

193+
.. _cookbook.csv:
194+
168195
CSV
169196
~~~
170197

198+
The :ref:`CSV <io.read_csv_table>` docs
199+
171200
`Reading a csv chunk-by-chunk
172201
<http://stackoverflow.com/questions/11622652/large-persistent-dataframe-in-pandas/12193309#12193309>`__
173202

@@ -177,15 +206,23 @@ CSV
177206
`Inferring dtypes from a file
178207
<http://stackoverflow.com/questions/15555005/get-inferred-dataframe-types-iteratively-using-chunksize>`__
179208

209+
.. _cookbook.sql:
210+
180211
SQL
181212
~~~
182213

214+
The :ref:`SQL <io.sql>` docs
215+
183216
`Reading from databases with SQL
184217
<http://stackoverflow.com/questions/10065051/python-pandas-and-databases-like-mysql>`__
185218

219+
.. _cookbook.hdf:
220+
186221
HDFStore
187222
~~~~~~~~
188223

224+
The :ref:`HDFStores <io.hdf5>` docs
225+
189226
`Simple Queries with a Timestamp Index
190227
<http://stackoverflow.com/questions/13926089/selecting-columns-from-pandas-hdfstore-table>`__
191228

@@ -222,5 +259,7 @@ Storing Attributes to a group node
222259
Miscellaneous
223260
-------------
224261

262+
The :ref:`Timedeltas <timeseries.timedeltas>` docs
263+
225264
`Operating with timedeltas
226265
<https://github.com/pydata/pandas/pull/2899>`__

doc/source/groupby.rst

+2
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,8 @@ We aim to make operations like this natural and easy to express using
5959
pandas. We'll address each area of GroupBy functionality then provide some
6060
non-trivial examples / use cases.
6161

62+
See some :ref:`cookbook examples <cookbook.grouping>` for some advanced strategies
63+
6264
.. _groupby.split:
6365

6466
Splitting an object into groups

doc/source/indexing.rst

+4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ attention in this area. Expect more work to be invested higher-dimensional data
3232
structures (including Panel) in the future, especially in label-based advanced
3333
indexing.
3434

35+
See some :ref:`cookbook examples <cookbook.selection>` for some advanced strategies
36+
3537
Choice
3638
------
3739

@@ -879,6 +881,8 @@ described above and in prior sections. Later, when discussing :ref:`group by
879881
non-trivial applications to illustrate how it aids in structuring data for
880882
analysis.
881883

884+
See some :ref:`cookbook examples <cookbook.multi_index>` for some advanced strategies
885+
882886
.. note::
883887

884888
Given that hierarchical indexing is so new to the library, it is definitely

doc/source/io.rst

+7
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ The two workhorse functions for reading text files (a.k.a. flat files) are
3737
They both use the same parsing code to intelligently convert tabular
3838
data into a DataFrame object. They can take a number of arguments:
3939

40+
See some :ref:`cookbook examples <cookbook.csv>` for some advanced strategies
41+
See some :ref:`cookbook examples <cookbook.csv>` for some advanced strategies
42+
4043
- ``filepath_or_buffer``: Either a string path to a file, or any object with a
4144
``read`` method (such as an open file or ``StringIO``).
4245
- ``sep`` or ``delimiter``: A delimiter / separator to split fields
@@ -981,6 +984,8 @@ HDF5 (PyTables)
981984
the high performance HDF5 format using the excellent `PyTables
982985
<http://www.pytables.org/>`__ library.
983986

987+
See some :ref:`cookbook examples <cookbook.hdf>` for some advanced strategies
988+
984989
.. ipython:: python
985990
:suppress:
986991
:okexcept:
@@ -1690,6 +1695,8 @@ facilitate data retrieval and to reduce dependency on DB-specific API. There
16901695
wrappers only support the Python database adapters which respect the `Python
16911696
DB-API <http://www.python.org/dev/peps/pep-0249/>`_.
16921697

1698+
See some :ref:`cookbook examples <cookbook.sql>` for some advanced strategies
1699+
16931700
Suppose you want to query some data with different types from a table such as:
16941701

16951702
+-----+------------+-------+-------+-------+

doc/source/merging.rst

+2
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,8 @@ better) than other open source implementations (like ``base::merge.data.frame``
304304
in R). The reason for this is careful algorithmic design and internal layout of
305305
the data in DataFrame.
306306

307+
See some :ref:`cookbook examples <cookbook.merge>` for some advanced strategies
308+
307309
pandas provides a single function, ``merge``, as the entry point for all
308310
standard database join operations between DataFrame objects:
309311

doc/source/timeseries.rst

+2
Original file line numberDiff line numberDiff line change
@@ -579,6 +579,8 @@ performing resampling operations during frequency conversion (e.g., converting
579579
secondly data into 5-minutely data). This is extremely common in, but not
580580
limited to, financial applications.
581581

582+
See some :ref:`cookbook examples <cookbook.resample>` for some advanced strategies
583+
582584
.. ipython:: python
583585
584586
rng = date_range('1/1/2012', periods=100, freq='S')

doc/source/visualization.rst

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ We use the standard convention for referencing the matplotlib API:
3333
Basic plotting: ``plot``
3434
------------------------
3535

36+
See some :ref:`cookbook examples <cookbook.plotting>` for some advanced strategies
37+
3638
The ``plot`` method on Series and DataFrame is just a simple wrapper around
3739
``plt.plot``:
3840

0 commit comments

Comments
 (0)