Skip to content

Commit 5a9dca0

Browse files
committed
DOC: mostly finished with doc updates
1 parent 44a15a6 commit 5a9dca0

File tree

4 files changed

+137
-77
lines changed

4 files changed

+137
-77
lines changed

TODO.rst

+3-4
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ TODO docs
3737
- DONE name attribute on Series
3838
- DONE Multi-key joining
3939
- DONE Inner join on key
40-
41-
- align functions
42-
- df[col_list]
43-
- Panel.rename_axis
40+
- DONE align functions
41+
- DONE df[col_list]
42+
- DONE Panel.rename_axis
4443

4544
Performance blog
4645
----------------

doc/source/api.rst

+89-72
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,88 @@
55
API Reference
66
*************
77

8+
.. _api.functions:
9+
10+
General functions
11+
-----------------
12+
13+
Data manipulations
14+
~~~~~~~~~~~~~~~~~~
15+
.. currentmodule:: pandas.tools.pivot
16+
17+
.. autosummary::
18+
:toctree: generated/
19+
20+
pivot_table
21+
22+
Pickling
23+
~~~~~~~~
24+
25+
.. currentmodule:: pandas.core.common
26+
27+
.. autosummary::
28+
:toctree: generated/
29+
30+
load
31+
save
32+
33+
File IO
34+
~~~~~~~
35+
36+
.. currentmodule:: pandas.io.parsers
37+
38+
.. autosummary::
39+
:toctree: generated/
40+
41+
read_table
42+
read_csv
43+
ExcelFile.parse
44+
45+
HDFStore: PyTables (HDF5)
46+
~~~~~~~~~~~~~~~~~~~~~~~~~
47+
.. currentmodule:: pandas.io.pytables
48+
49+
.. autosummary::
50+
:toctree: generated/
51+
52+
HDFStore.put
53+
HDFStore.get
54+
55+
Standard moving window functions
56+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
57+
58+
.. currentmodule:: pandas.stats.moments
59+
60+
.. autosummary::
61+
:toctree: generated/
62+
63+
rolling_count
64+
rolling_sum
65+
rolling_mean
66+
rolling_median
67+
rolling_var
68+
rolling_std
69+
rolling_corr
70+
rolling_cov
71+
rolling_skew
72+
rolling_kurt
73+
rolling_apply
74+
rolling_quantile
75+
76+
Exponentially-weighted moving window functions
77+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
78+
79+
.. autosummary::
80+
:toctree: generated/
81+
82+
ewma
83+
ewmstd
84+
ewmvar
85+
ewmcorr
86+
ewmcov
87+
88+
.. currentmodule:: pandas
89+
890
.. _api.series:
991

1092
Series
@@ -20,6 +102,8 @@ Attributes and underlying data
20102

21103
Series.values
22104
Series.dtype
105+
Series.isnull
106+
Series.notnull
23107

24108
Conversion / Constructors
25109
~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -89,12 +173,14 @@ Computations / Descriptive Stats
89173
Series.std
90174
Series.sum
91175
Series.var
176+
Series.value_counts
92177

93178
Reindexing / Selection / Label manipulation
94179
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
95180
.. autosummary::
96181
:toctree: generated/
97182

183+
Series.align
98184
Series.drop
99185
Series.reindex
100186
Series.reindex_like
@@ -178,6 +264,8 @@ Attributes and underlying data
178264
:toctree: generated/
179265

180266
DataFrame.as_matrix
267+
DataFrame.dtypes
268+
DataFrame.get_dtype_counts
181269
DataFrame.values
182270
DataFrame.axes
183271
DataFrame.ndim
@@ -267,6 +355,7 @@ Reindexing / Selection / Label manipulation
267355

268356
DataFrame.add_prefix
269357
DataFrame.add_suffix
358+
DataFrame.align
270359
DataFrame.drop
271360
DataFrame.filter
272361
DataFrame.reindex
@@ -355,75 +444,3 @@ Panel
355444
Computations / Descriptive Stats
356445
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
357446

358-
359-
Input / Output
360-
--------------
361-
362-
.. currentmodule:: pandas.io.parsers
363-
364-
File IO
365-
~~~~~~~
366-
367-
.. autosummary::
368-
:toctree: generated/
369-
370-
read_table
371-
read_csv
372-
ExcelFile.parse
373-
374-
HDFStore: PyTables (HDF5)
375-
~~~~~~~~~~~~~~~~~~~~~~~~~
376-
.. currentmodule:: pandas.io.pytables
377-
378-
.. autosummary::
379-
:toctree: generated/
380-
381-
HDFStore.put
382-
HDFStore.get
383-
384-
GroupBy
385-
-------
386-
387-
.. currentmodule:: pandas.core.groupby
388-
389-
.. autosummary::
390-
:toctree: generated/
391-
392-
groupby
393-
394-
Moving window statistics
395-
------------------------
396-
397-
Standard moving window functions
398-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
399-
400-
.. currentmodule:: pandas.stats.moments
401-
402-
.. autosummary::
403-
:toctree: generated/
404-
405-
rolling_count
406-
rolling_sum
407-
rolling_mean
408-
rolling_median
409-
rolling_var
410-
rolling_std
411-
rolling_corr
412-
rolling_cov
413-
rolling_skew
414-
rolling_kurt
415-
rolling_apply
416-
rolling_quantile
417-
418-
Exponentially-weighted moving window functions
419-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
420-
421-
.. autosummary::
422-
:toctree: generated/
423-
424-
ewma
425-
ewmstd
426-
ewmvar
427-
ewmcorr
428-
ewmcov
429-

doc/source/basics.rst

+34-1
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ Reindexing to align with another object
467467
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
468468

469469
You may wish to take an object and reindex its axes to be labeled the same as
470-
another object. While the syntax for this is straightforwad albeit verbose, it
470+
another object. While the syntax for this is straightforward albeit verbose, it
471471
is a common enough operation that the ``reindex_like`` method is available to
472472
make this simpler:
473473

@@ -484,6 +484,36 @@ make this simpler:
484484
df2
485485
df.reindex_like(df2)
486486
487+
.. _basics.align:
488+
489+
Aligning objects with each other with ``align``
490+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
491+
492+
The ``align`` method is the fastest way to simultaneously align two objects. It
493+
supports a ``join`` argument (related to :ref:`joining and merging <merging>`):
494+
495+
- ``join='outer'``: take the union of the indexes
496+
- ``join='left'``: use the calling object's index
497+
- ``join='right'``: use the passed object's index
498+
- ``join='inner'``: intersect the indexes
499+
500+
It returns a tuple with both of the reindexed Series:
501+
502+
.. ipython:: python
503+
504+
s = Series(randn(5), index=['a', 'b', 'c', 'd', 'e'])
505+
s1 = s[:4]
506+
s2 = s[1:]
507+
s1.align(s2)
508+
s1.align(s2, join='inner')
509+
s1.align(s2, join='left')
510+
511+
For DataFrames, the join method will be applied to both the
512+
513+
.. ipython:: python
514+
515+
df.align(df2, join='inner')
516+
487517
.. _basics.reindex_fill:
488518

489519
Filling while reindexing
@@ -573,6 +603,9 @@ Series, it need only contain a subset of the labels as keys:
573603
df.rename(columns={'one' : 'foo', 'two' : 'bar'},
574604
index={'a' : 'apple', 'b' : 'banana', 'd' : 'durian'})
575605
606+
The Panel class has an a related ``rename_axis`` class which can rename any of
607+
its three axes.
608+
576609
Iteration
577610
---------
578611

doc/source/indexing.rst

+11
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,17 @@ As we will see later on, the same operation could be accomplished by
187187
reindexing. However, the syntax would be more verbose; hence, the inclusion of
188188
this indexing method.
189189

190+
Selecting DataFrame columns
191+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
192+
193+
You can pass a list of columns to ``[]`` to select columns in that order:
194+
195+
.. ipython:: python
196+
197+
df[['C', 'A', 'B']]
198+
199+
If a column is not contained in the DataFrame, an exception will be raised:
200+
190201
.. _indexing.advanced:
191202

192203
Advanced indexing with labels

0 commit comments

Comments
 (0)