@@ -734,7 +734,7 @@ def rename_axis(self, mapper, axis=0, copy=True, inplace=False):
734
734
1 2 5
735
735
2 3 6
736
736
"""
737
- inplace = _validate_bool_type (inplace )
737
+ inplace = _validate_bool_type (inplace , 'inplace' )
738
738
non_mapper = is_scalar (mapper ) or (is_list_like (mapper ) and not
739
739
is_dict_like (mapper ))
740
740
if non_mapper :
@@ -1896,7 +1896,7 @@ def drop(self, labels, axis=0, level=None, inplace=False, errors='raise'):
1896
1896
-------
1897
1897
dropped : type of caller
1898
1898
"""
1899
- inplace = _validate_bool_type (inplace )
1899
+ inplace = _validate_bool_type (inplace , 'inplace' )
1900
1900
axis = self ._get_axis_number (axis )
1901
1901
axis_name = self ._get_axis_name (axis )
1902
1902
axis , axis_ = self ._get_axis (axis ), axis
@@ -2045,7 +2045,7 @@ def sort_values(self, by, axis=0, ascending=True, inplace=False,
2045
2045
@Appender (_shared_docs ['sort_index' ] % dict (axes = "axes" , klass = "NDFrame" ))
2046
2046
def sort_index (self , axis = 0 , level = None , ascending = True , inplace = False ,
2047
2047
kind = 'quicksort' , na_position = 'last' , sort_remaining = True ):
2048
- inplace = _validate_bool_type (inplace )
2048
+ inplace = _validate_bool_type (inplace , 'inplace' )
2049
2049
axis = self ._get_axis_number (axis )
2050
2050
axis_name = self ._get_axis_name (axis )
2051
2051
labels = self ._get_axis (axis )
@@ -2819,7 +2819,7 @@ def consolidate(self, inplace=False):
2819
2819
-------
2820
2820
consolidated : type of caller
2821
2821
"""
2822
- inplace = _validate_bool_type (inplace )
2822
+ inplace = _validate_bool_type (inplace , 'inplace' )
2823
2823
if inplace :
2824
2824
self ._consolidate_inplace ()
2825
2825
else :
@@ -3205,7 +3205,7 @@ def convert_objects(self, convert_dates=True, convert_numeric=False,
3205
3205
@Appender (_shared_docs ['fillna' ] % _shared_doc_kwargs )
3206
3206
def fillna (self , value = None , method = None , axis = None , inplace = False ,
3207
3207
limit = None , downcast = None ):
3208
- inplace = _validate_bool_type (inplace )
3208
+ inplace = _validate_bool_type (inplace , 'inplace' )
3209
3209
if isinstance (value , (list , tuple )):
3210
3210
raise TypeError ('"value" parameter must be a scalar or dict, but '
3211
3211
'you passed a "{0}"' .format (type (value ).__name__ ))
@@ -3414,7 +3414,7 @@ def replace(self, to_replace=None, value=None, inplace=False, limit=None,
3414
3414
and play with this method to gain intuition about how it works.
3415
3415
3416
3416
"""
3417
- inplace = _validate_bool_type (inplace )
3417
+ inplace = _validate_bool_type (inplace , 'inplace' )
3418
3418
if not is_bool (regex ) and to_replace is not None :
3419
3419
raise AssertionError ("'to_replace' must be 'None' if 'regex' is "
3420
3420
"not a bool" )
@@ -3647,7 +3647,7 @@ def interpolate(self, method='linear', axis=0, limit=None, inplace=False,
3647
3647
"""
3648
3648
Interpolate values according to different methods.
3649
3649
"""
3650
- inplace = _validate_bool_type (inplace )
3650
+ inplace = _validate_bool_type (inplace , 'inplace' )
3651
3651
3652
3652
if self .ndim > 2 :
3653
3653
raise NotImplementedError ("Interpolate has not been implemented "
@@ -4558,7 +4558,7 @@ def _where(self, cond, other=np.nan, inplace=False, axis=None, level=None,
4558
4558
Equivalent to public method `where`, except that `other` is not
4559
4559
applied as a function even if callable. Used in __setitem__.
4560
4560
"""
4561
- inplace = _validate_bool_type (inplace )
4561
+ inplace = _validate_bool_type (inplace , 'inplace' )
4562
4562
4563
4563
cond = com ._apply_if_callable (cond , self )
4564
4564
@@ -4826,7 +4826,7 @@ def where(self, cond, other=np.nan, inplace=False, axis=None, level=None,
4826
4826
def mask (self , cond , other = np .nan , inplace = False , axis = None , level = None ,
4827
4827
try_cast = False , raise_on_error = True ):
4828
4828
4829
- inplace = _validate_bool_type (inplace )
4829
+ inplace = _validate_bool_type (inplace , 'inplace' )
4830
4830
cond = com ._apply_if_callable (cond , self )
4831
4831
4832
4832
return self .where (~ cond , other = other , inplace = inplace , axis = axis ,
0 commit comments