Skip to content

Commit 9cba0de

Browse files
committed
DOC: cookbook example
1 parent 5a2daa4 commit 9cba0de

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

doc/source/cookbook.rst

+9
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,15 @@ Missing Data
117117

118118
The :ref:`missing data <missing_data>` docs.
119119

120+
Fill forward a reversed timeseries
121+
122+
.. ipython:: python
123+
124+
df = pd.DataFrame(np.random.randn(6,1), index=pd.date_range('2013-08-01', periods=6, freq='B'), columns=list('A'))
125+
df.ix[3,'A'] = np.nan
126+
df
127+
df.reindex(df.index[::-1]).reset_index().ffill().set_index('index')
128+
120129
Replace
121130
~~~~~~~
122131

0 commit comments

Comments
 (0)