Skip to content

Commit 9b6ceb9

Browse files
author
Chang She
committed
DOC: links for some of whatsnew features
1 parent 911fec2 commit 9b6ceb9

File tree

5 files changed

+65
-11
lines changed

5 files changed

+65
-11
lines changed

doc/source/computation.rst

+20
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,26 @@ Computational tools
1919
Statistical functions
2020
---------------------
2121

22+
.. _computation.pct_change:
23+
Percent Change
24+
~~~~~~~~~~~~~~
25+
26+
Both ``Series`` and ``DataFrame`` has a method ``pct_change`` to compute the
27+
percent change over a given number of periods (using ``fill_method`` to fill
28+
NA/null values).
29+
30+
.. ipython:: python
31+
32+
ser = Series(randn(8))
33+
34+
ser.pct_change()
35+
36+
.. ipython:: python
37+
38+
df = DataFrame(randn(10, 4))
39+
40+
df.pct_change(periods=3)
41+
2242
.. _computation.covariance:
2343

2444
Covariance

doc/source/io.rst

+5-1
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,8 @@ You can also use a list of columns to create a hierarchical index:
158158
159159
read_csv('foo.csv', index_col=[0, 'A'])
160160
161+
.. _io.dialect:
162+
161163
The ``dialect`` keyword gives greater flexibility in specifying the file format.
162164
By default it uses the Excel dialect but you can specify either the dialect name
163165
or a `csv.Dialect <docs.python.org/library/csv.html#csv.Dialect>`_ instance.
@@ -294,7 +296,7 @@ a single date rather than the entire array.
294296
295297
os.remove('tmp.csv')
296298
297-
.. _io.convenience:
299+
.. _io.thousands:
298300

299301
Thousand Separators
300302
~~~~~~~~~~~~~~~~~~~
@@ -338,6 +340,8 @@ The ``thousands`` keyword allows integers to be parsed correctly
338340
339341
os.remove('tmp.csv')
340342
343+
.. _io.comments:
344+
341345
Comments
342346
~~~~~~~~
343347
Sometimes comments or meta data may be included in a file:

doc/source/missing_data.rst

+17
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,23 @@ can propagate non-null values forward or backward:
155155
df
156156
df.fillna(method='pad')
157157
158+
.. _missing_data.fillna.limit:
159+
160+
**Limit the amount of filling**
161+
162+
If we only want consecutive gaps filled up to a certain number of data points,
163+
we can use the `limit` keyword:
164+
165+
.. ipython:: python
166+
:suppress:
167+
168+
df.ix[2:4, :] = np.nan
169+
170+
.. ipython:: python
171+
172+
df
173+
df.fillna(method='pad', limit=1)
174+
158175
To remind you, these are the available filling methods:
159176

160177
.. csv-table::

doc/source/visualization.rst

+11-2
Original file line numberDiff line numberDiff line change
@@ -244,8 +244,17 @@ Scatter plot matrix
244244
@savefig scatter_matrix_kde.png width=6in
245245
scatter_matrix(df, alpha=0.2, figsize=(8, 8), diagonal='kde')
246246
247-
@savefig scatter_matrix_hist.png width=6in
248-
scatter_matrix(df, alpha=0.2, figsize=(8, 8), diagonal='hist')
247+
.. _visualization.kde:
248+
249+
*New in 0.8.0* You can create density plots using the Series/DataFrame.plot and
250+
setting `kind='kde'`:
251+
252+
.. ipython:: python
253+
254+
ser = Series(np.random.randn(1000))
255+
256+
@savefig kde_plot.png width=6in
257+
ser.plot(kind='kde')
249258
250259
.. _visualization.andrews_curves:
251260

doc/source/whatsnew/v0.8.0.txt

+12-8
Original file line numberDiff line numberDiff line change
@@ -103,15 +103,19 @@ Other new features
103103

104104
- New ``cut`` function (like R's cut function) for computing a categorical
105105
variable from a continuous variable by binning values
106-
- Add limit argument to fillna/reindex
106+
- Add :ref:`limit <missing_data.fillna.limit>` argument to fillna/reindex
107107
- More flexible multiple function application in GroupBy, and can pass list
108108
(name, function) tuples to get result in particular order with given names
109109
- Add flexible ``replace`` method for efficiently substituting values
110-
- Enhanced read_csv/read_table for reading time series data and converting
111-
multiple columns to dates
112-
- Add comments option to parser functions: read_csv, etc.
110+
- Enhanced :ref:`read_csv/read_table <io.parse_dates>` for reading time series
111+
data and converting multiple columns to dates
112+
- Add :ref:`comments <io.comments>` option to parser functions: read_csv, etc.
113113
- Add ``dayfirst`` option to parser functions for parsing international
114114
DD/MM/YYYY dates
115+
- Allow the user to specify the CSV reader :ref:`dialect <io.dialect>` to
116+
control quoting etc.
117+
- Handling :ref:`thousands <io.thousands>` separators in read_csv to improve
118+
integer parsing.
115119
- Enable unstacking of multiple levels in one shot. Alleviate ``pivot_table``
116120
bugs (empty columns being introduced)
117121
- Move to klib-based hash tables for indexing; better performance and less
@@ -120,12 +124,12 @@ Other new features
120124
- New ordered_merge function
121125
- Add flexible comparison instance methods eq, ne, lt, gt, etc. to DataFrame,
122126
Series
123-
- Improve scatter_matrix plotting function and add histogram or kernel density
124-
estimates to diagonal
125-
- Add ``'kde'`` plot option for density plots
127+
- Improve :ref:`scatter_matrix <visualization.scatter_matrix>` plotting
128+
function and add histogram or kernel density estimates to diagonal
129+
- Add :ref:`'kde' <visualization.kde>` plot option for density plots
126130
- Support for converting DataFrame to R data.frame through rpy2
127131
- Improved support for complex numbers in Series and DataFrame
128-
- Add ``pct_change`` method to all data structures
132+
- Add :ref:`pct_change <computation.pct_change>` method to all data structures
129133
- Add max_colwidth configuration option for DataFrame console output
130134
- Interpolate Series values using index values
131135
- Can select multiple columns from GroupBy

0 commit comments

Comments
 (0)