@@ -3354,12 +3354,16 @@ def fillna(self, value=None, method=None, axis=None, inplace=False,
3354
3354
return self ._constructor (new_data ).__finalize__ (self )
3355
3355
3356
3356
def ffill (self , axis = None , inplace = False , limit = None , downcast = None ):
3357
- """Synonym for NDFrame.fillna(method='ffill')"""
3357
+ """
3358
+ Synonym for :meth:`DataFrame.fillna(method='ffill') <DataFrame.fillna>`
3359
+ """
3358
3360
return self .fillna (method = 'ffill' , axis = axis , inplace = inplace ,
3359
3361
limit = limit , downcast = downcast )
3360
3362
3361
3363
def bfill (self , axis = None , inplace = False , limit = None , downcast = None ):
3362
- """Synonym for NDFrame.fillna(method='bfill')"""
3364
+ """
3365
+ Synonym for :meth:`DataFrame.fillna(method='bfill') <DataFrame.fillna>`
3366
+ """
3363
3367
return self .fillna (method = 'bfill' , axis = axis , inplace = inplace ,
3364
3368
limit = limit , downcast = downcast )
3365
3369
@@ -5477,16 +5481,18 @@ def compound(self, axis=None, skipna=None, level=None):
5477
5481
5478
5482
cls .cummin = _make_cum_function (
5479
5483
cls , 'cummin' , name , name2 , axis_descr , "cumulative minimum" ,
5480
- lambda y , axis : np .minimum .accumulate (y , axis ), np .inf , np .nan )
5484
+ lambda y , axis : np .minimum .accumulate (y , axis ), "min" ,
5485
+ np .inf , np .nan )
5481
5486
cls .cumsum = _make_cum_function (
5482
5487
cls , 'cumsum' , name , name2 , axis_descr , "cumulative sum" ,
5483
- lambda y , axis : y .cumsum (axis ), 0. , np .nan )
5488
+ lambda y , axis : y .cumsum (axis ), "sum" , 0. , np .nan )
5484
5489
cls .cumprod = _make_cum_function (
5485
5490
cls , 'cumprod' , name , name2 , axis_descr , "cumulative product" ,
5486
- lambda y , axis : y .cumprod (axis ), 1. , np .nan )
5491
+ lambda y , axis : y .cumprod (axis ), "prod" , 1. , np .nan )
5487
5492
cls .cummax = _make_cum_function (
5488
5493
cls , 'cummax' , name , name2 , axis_descr , "cumulative max" ,
5489
- lambda y , axis : np .maximum .accumulate (y , axis ), - np .inf , np .nan )
5494
+ lambda y , axis : np .maximum .accumulate (y , axis ), "max" ,
5495
+ - np .inf , np .nan )
5490
5496
5491
5497
cls .sum = _make_stat_function (
5492
5498
cls , 'sum' , name , name2 , axis_descr ,
@@ -5674,7 +5680,15 @@ def _doc_parms(cls):
5674
5680
5675
5681
Returns
5676
5682
-------
5677
- %(outname)s : %(name1)s\n """
5683
+ %(outname)s : %(name1)s\n
5684
+
5685
+
5686
+ See also
5687
+ --------
5688
+ pandas.core.window.Expanding.%(accum_func_name)s : Similar functionality
5689
+ but ignores ``NaN`` values.
5690
+
5691
+ """
5678
5692
5679
5693
5680
5694
def _make_stat_function (cls , name , name1 , name2 , axis_descr , desc , f ):
@@ -5717,10 +5731,10 @@ def stat_func(self, axis=None, skipna=None, level=None, ddof=1,
5717
5731
return set_function_name (stat_func , name , cls )
5718
5732
5719
5733
5720
- def _make_cum_function (cls , name , name1 , name2 , axis_descr , desc , accum_func ,
5721
- mask_a , mask_b ):
5734
+ def _make_cum_function (cls , name , name1 , name2 , axis_descr , desc ,
5735
+ accum_func , accum_func_name , mask_a , mask_b ):
5722
5736
@Substitution (outname = name , desc = desc , name1 = name1 , name2 = name2 ,
5723
- axis_descr = axis_descr )
5737
+ axis_descr = axis_descr , accum_func_name = accum_func_name )
5724
5738
@Appender ("Return {0} over requested axis." .format (desc ) +
5725
5739
_cnum_doc )
5726
5740
def cum_func (self , axis = None , skipna = True , * args , ** kwargs ):
0 commit comments