-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
AlgosNon-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diffNon-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diffDocsNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations
Milestone
Description
xref #12648
- cross-link doc-strings for .cum* to the .expanding().* (for sum,prod,max,min, which are only supported).
- show an example (in computation.rst wher eexpanding is shown? or basics.rst (where cum* are shown)) how these are related (w.r.t. NaN filling).
In [7]: s = Series([1,2,np.nan,3,np.nan,4])
In [8]: s.cumsum()
Out[8]:
0 1.0
1 3.0
2 NaN
3 6.0
4 NaN
5 10.0
dtype: float64
In [9]: s.expanding().sum()
Out[9]:
0 1.0
1 3.0
2 3.0
3 6.0
4 6.0
5 10.0
dtype: float64
In [10]: s.cumsum().ffill()
Out[10]:
0 1.0
1 3.0
2 3.0
3 6.0
4 6.0
5 10.0
dtype: float64
Metadata
Metadata
Assignees
Labels
AlgosNon-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diffNon-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diffDocsNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations