Skip to content

Commit 80e93bf

Browse files
committed
DOC: clean computation.rst a bit
1 parent 7aba1ca commit 80e93bf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/source/computation.rst

+4-2
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,9 @@ An obvious one is aggregation via the ``aggregate`` or equivalently ``agg`` meth
485485

486486
.. ipython:: python
487487
488-
dfa = pd.DataFrame(np.random.randn(1000, 3), index=s.index,
489-
columns=['A', 'B', 'C'])
488+
dfa = pd.DataFrame(np.random.randn(1000, 3),
489+
index=pd.date_range('1/1/2000', periods=1000),
490+
columns=['A', 'B', 'C'])
490491
r = dfa.rolling(window=60,min_periods=1)
491492
r
492493
@@ -540,6 +541,7 @@ By passing a dict to ``aggregate`` you can apply a different aggregation to the
540541
columns of a DataFrame:
541542

542543
.. ipython:: python
544+
:okexcept:
543545
544546
r.agg({'A' : np.sum,
545547
'B' : lambda x: np.std(x, ddof=1)})

0 commit comments

Comments
 (0)