@@ -1932,7 +1932,7 @@ def tail(self, n=5):
1932
1932
#----------------------------------------------------------------------
1933
1933
# Attribute access
1934
1934
1935
- def __finalize__ (self , other , method = None ):
1935
+ def __finalize__ (self , other , method = None , ** kwargs ):
1936
1936
"""
1937
1937
propagate metadata from other to self
1938
1938
@@ -3404,7 +3404,7 @@ def mask(self, cond):
3404
3404
"""
3405
3405
return self .where (~ cond , np .nan )
3406
3406
3407
- def shift (self , periods = 1 , freq = None , axis = 0 , ** kwds ):
3407
+ def shift (self , periods = 1 , freq = None , axis = 0 , ** kwargs ):
3408
3408
"""
3409
3409
Shift index by desired number of periods with an optional time freq
3410
3410
@@ -3430,10 +3430,10 @@ def shift(self, periods=1, freq=None, axis=0, **kwds):
3430
3430
return self
3431
3431
3432
3432
block_axis = self ._get_block_manager_axis (axis )
3433
- if freq is None and not len (kwds ):
3433
+ if freq is None and not len (kwargs ):
3434
3434
new_data = self ._data .shift (periods = periods , axis = block_axis )
3435
3435
else :
3436
- return self .tshift (periods , freq , ** kwds )
3436
+ return self .tshift (periods , freq , ** kwargs )
3437
3437
3438
3438
return self ._constructor (new_data ).__finalize__ (self )
3439
3439
@@ -3473,7 +3473,7 @@ def slice_shift(self, periods=1, axis=0):
3473
3473
3474
3474
return new_obj .__finalize__ (self )
3475
3475
3476
- def tshift (self , periods = 1 , freq = None , axis = 0 , ** kwds ):
3476
+ def tshift (self , periods = 1 , freq = None , axis = 0 , ** kwargs ):
3477
3477
"""
3478
3478
Shift the time index, using the index's frequency if available
3479
3479
@@ -3512,7 +3512,7 @@ def tshift(self, periods=1, freq=None, axis=0, **kwds):
3512
3512
if periods == 0 :
3513
3513
return self
3514
3514
3515
- offset = _resolve_offset (freq , kwds )
3515
+ offset = _resolve_offset (freq , kwargs )
3516
3516
3517
3517
if isinstance (offset , string_types ):
3518
3518
offset = datetools .to_offset (offset )
@@ -3894,28 +3894,28 @@ def describe_1d(data, percentiles):
3894
3894
3895
3895
@Appender (_shared_docs ['pct_change' ] % _shared_doc_kwargs )
3896
3896
def pct_change (self , periods = 1 , fill_method = 'pad' , limit = None , freq = None ,
3897
- ** kwds ):
3897
+ ** kwargs ):
3898
3898
# TODO: Not sure if above is correct - need someone to confirm.
3899
- axis = self ._get_axis_number (kwds .pop ('axis' , self ._stat_axis_name ))
3899
+ axis = self ._get_axis_number (kwargs .pop ('axis' , self ._stat_axis_name ))
3900
3900
if fill_method is None :
3901
3901
data = self
3902
3902
else :
3903
3903
data = self .fillna (method = fill_method , limit = limit )
3904
3904
3905
3905
rs = (data .div (data .shift (periods = periods , freq = freq ,
3906
- axis = axis , ** kwds )) - 1 )
3906
+ axis = axis , ** kwargs )) - 1 )
3907
3907
if freq is None :
3908
3908
mask = com .isnull (_values_from_object (self ))
3909
3909
np .putmask (rs .values , mask , np .nan )
3910
3910
return rs
3911
3911
3912
- def _agg_by_level (self , name , axis = 0 , level = 0 , skipna = True , ** kwds ):
3912
+ def _agg_by_level (self , name , axis = 0 , level = 0 , skipna = True , ** kwargs ):
3913
3913
grouped = self .groupby (level = level , axis = axis )
3914
3914
if hasattr (grouped , name ) and skipna :
3915
- return getattr (grouped , name )(** kwds )
3915
+ return getattr (grouped , name )(** kwargs )
3916
3916
axis = self ._get_axis_number (axis )
3917
3917
method = getattr (type (self ), name )
3918
- applyf = lambda x : method (x , axis = axis , skipna = skipna , ** kwds )
3918
+ applyf = lambda x : method (x , axis = axis , skipna = skipna , ** kwargs )
3919
3919
return grouped .aggregate (applyf )
3920
3920
3921
3921
@classmethod
0 commit comments