@@ -724,7 +724,7 @@ def replace(
724724 # _can_hold_element checks have reduced this back to the
725725 # scalar case and we can avoid a costly object cast
726726 return self .replace (
727- to_replace [0 ], value , inplace = inplace , regex = regex , convert = convert ,
727+ to_replace [0 ], value , inplace = inplace , regex = regex , convert = convert
728728 )
729729
730730 # GH 22083, TypeError or ValueError occurred within error handling
@@ -905,7 +905,7 @@ def setitem(self, indexer, value):
905905 return block
906906
907907 def putmask (
908- self , mask , new , inplace : bool = False , axis : int = 0 , transpose : bool = False ,
908+ self , mask , new , inplace : bool = False , axis : int = 0 , transpose : bool = False
909909 ) -> List ["Block" ]:
910910 """
911911 putmask the data to the block; it is possible that we may create a
@@ -1292,7 +1292,7 @@ def shift(self, periods: int, axis: int = 0, fill_value=None):
12921292 return [self .make_block (new_values )]
12931293
12941294 def where (
1295- self , other , cond , errors = "raise" , try_cast : bool = False , axis : int = 0 ,
1295+ self , other , cond , errors = "raise" , try_cast : bool = False , axis : int = 0
12961296 ) -> List ["Block" ]:
12971297 """
12981298 evaluate the block; return result block(s) from the result
@@ -1366,7 +1366,7 @@ def where_func(cond, values, other):
13661366 # we are explicitly ignoring errors
13671367 block = self .coerce_to_target_dtype (other )
13681368 blocks = block .where (
1369- orig_other , cond , errors = errors , try_cast = try_cast , axis = axis ,
1369+ orig_other , cond , errors = errors , try_cast = try_cast , axis = axis
13701370 )
13711371 return self ._maybe_downcast (blocks , "infer" )
13721372
@@ -1605,7 +1605,7 @@ def set(self, locs, values):
16051605 self .values = values
16061606
16071607 def putmask (
1608- self , mask , new , inplace : bool = False , axis : int = 0 , transpose : bool = False ,
1608+ self , mask , new , inplace : bool = False , axis : int = 0 , transpose : bool = False
16091609 ) -> List ["Block" ]:
16101610 """
16111611 See Block.putmask.__doc__
@@ -1816,7 +1816,7 @@ def diff(self, n: int, axis: int = 1) -> List["Block"]:
18161816 return super ().diff (n , axis )
18171817
18181818 def shift (
1819- self , periods : int , axis : int = 0 , fill_value : Any = None ,
1819+ self , periods : int , axis : int = 0 , fill_value : Any = None
18201820 ) -> List ["ExtensionBlock" ]:
18211821 """
18221822 Shift the block by `periods`.
@@ -1833,7 +1833,7 @@ def shift(
18331833 ]
18341834
18351835 def where (
1836- self , other , cond , errors = "raise" , try_cast : bool = False , axis : int = 0 ,
1836+ self , other , cond , errors = "raise" , try_cast : bool = False , axis : int = 0
18371837 ) -> List ["Block" ]:
18381838
18391839 cond = _extract_bool_array (cond )
@@ -1945,7 +1945,7 @@ def _can_hold_element(self, element: Any) -> bool:
19451945 )
19461946
19471947 def to_native_types (
1948- self , na_rep = "" , float_format = None , decimal = "." , quoting = None , ** kwargs ,
1948+ self , na_rep = "" , float_format = None , decimal = "." , quoting = None , ** kwargs
19491949 ):
19501950 """ convert to our native types format """
19511951 values = self .values
@@ -2369,7 +2369,7 @@ def replace(self, to_replace, value, inplace=False, regex=False, convert=True):
23692369 if not np .can_cast (to_replace_values , bool ):
23702370 return self
23712371 return super ().replace (
2372- to_replace , value , inplace = inplace , regex = regex , convert = convert ,
2372+ to_replace , value , inplace = inplace , regex = regex , convert = convert
23732373 )
23742374
23752375
@@ -2453,18 +2453,18 @@ def replace(self, to_replace, value, inplace=False, regex=False, convert=True):
24532453
24542454 if not either_list and is_re (to_replace ):
24552455 return self ._replace_single (
2456- to_replace , value , inplace = inplace , regex = True , convert = convert ,
2456+ to_replace , value , inplace = inplace , regex = True , convert = convert
24572457 )
24582458 elif not (either_list or regex ):
24592459 return super ().replace (
2460- to_replace , value , inplace = inplace , regex = regex , convert = convert ,
2460+ to_replace , value , inplace = inplace , regex = regex , convert = convert
24612461 )
24622462 elif both_lists :
24632463 for to_rep , v in zip (to_replace , value ):
24642464 result_blocks = []
24652465 for b in blocks :
24662466 result = b ._replace_single (
2467- to_rep , v , inplace = inplace , regex = regex , convert = convert ,
2467+ to_rep , v , inplace = inplace , regex = regex , convert = convert
24682468 )
24692469 result_blocks = _extend_blocks (result , result_blocks )
24702470 blocks = result_blocks
@@ -2475,18 +2475,18 @@ def replace(self, to_replace, value, inplace=False, regex=False, convert=True):
24752475 result_blocks = []
24762476 for b in blocks :
24772477 result = b ._replace_single (
2478- to_rep , value , inplace = inplace , regex = regex , convert = convert ,
2478+ to_rep , value , inplace = inplace , regex = regex , convert = convert
24792479 )
24802480 result_blocks = _extend_blocks (result , result_blocks )
24812481 blocks = result_blocks
24822482 return result_blocks
24832483
24842484 return self ._replace_single (
2485- to_replace , value , inplace = inplace , convert = convert , regex = regex ,
2485+ to_replace , value , inplace = inplace , convert = convert , regex = regex
24862486 )
24872487
24882488 def _replace_single (
2489- self , to_replace , value , inplace = False , regex = False , convert = True , mask = None ,
2489+ self , to_replace , value , inplace = False , regex = False , convert = True , mask = None
24902490 ):
24912491 """
24922492 Replace elements by the given value.
0 commit comments