56
56
ABCPandasArray ,
57
57
ABCSeries ,
58
58
)
59
- from pandas .core .dtypes .missing import _isna_compat , is_valid_nat_for_dtype , isna
59
+ from pandas .core .dtypes .missing import is_valid_nat_for_dtype , isna , isna_compat
60
60
61
61
import pandas .core .algorithms as algos
62
62
from pandas .core .array_algos .transforms import shift
@@ -487,7 +487,7 @@ def _maybe_downcast(self, blocks: List["Block"], downcast=None) -> List["Block"]
487
487
):
488
488
return blocks
489
489
490
- return _extend_blocks ([b .downcast (downcast ) for b in blocks ])
490
+ return extend_blocks ([b .downcast (downcast ) for b in blocks ])
491
491
492
492
def downcast (self , dtypes = None ):
493
493
""" try to downcast each item to the dict of dtypes if present """
@@ -2474,7 +2474,7 @@ def _maybe_downcast(self, blocks: List["Block"], downcast=None) -> List["Block"]
2474
2474
return blocks
2475
2475
2476
2476
# split and convert the blocks
2477
- return _extend_blocks ([b .convert (datetime = True , numeric = False ) for b in blocks ])
2477
+ return extend_blocks ([b .convert (datetime = True , numeric = False ) for b in blocks ])
2478
2478
2479
2479
def _can_hold_element (self , element : Any ) -> bool :
2480
2480
return True
@@ -2503,7 +2503,7 @@ def replace(self, to_replace, value, inplace=False, regex=False, convert=True):
2503
2503
result = b ._replace_single (
2504
2504
to_rep , v , inplace = inplace , regex = regex , convert = convert
2505
2505
)
2506
- result_blocks = _extend_blocks (result , result_blocks )
2506
+ result_blocks = extend_blocks (result , result_blocks )
2507
2507
blocks = result_blocks
2508
2508
return result_blocks
2509
2509
@@ -2514,7 +2514,7 @@ def replace(self, to_replace, value, inplace=False, regex=False, convert=True):
2514
2514
result = b ._replace_single (
2515
2515
to_rep , value , inplace = inplace , regex = regex , convert = convert
2516
2516
)
2517
- result_blocks = _extend_blocks (result , result_blocks )
2517
+ result_blocks = extend_blocks (result , result_blocks )
2518
2518
blocks = result_blocks
2519
2519
return result_blocks
2520
2520
@@ -2769,7 +2769,7 @@ def make_block(values, placement, klass=None, ndim=None, dtype=None):
2769
2769
# -----------------------------------------------------------------
2770
2770
2771
2771
2772
- def _extend_blocks (result , blocks = None ):
2772
+ def extend_blocks (result , blocks = None ):
2773
2773
""" return a new extended blocks, given the result """
2774
2774
if blocks is None :
2775
2775
blocks = []
@@ -2860,7 +2860,7 @@ def _putmask_smart(v: np.ndarray, mask: np.ndarray, n) -> np.ndarray:
2860
2860
else :
2861
2861
# make sure that we have a nullable type
2862
2862
# if we have nulls
2863
- if not _isna_compat (v , nn [0 ]):
2863
+ if not isna_compat (v , nn [0 ]):
2864
2864
pass
2865
2865
elif not (is_float_dtype (nn .dtype ) or is_integer_dtype (nn .dtype )):
2866
2866
# only compare integers/floats
0 commit comments