diff --git a/pandas/core/internals/blocks.py b/pandas/core/internals/blocks.py index f2f8b6067c415..c429a65ed3369 100644 --- a/pandas/core/internals/blocks.py +++ b/pandas/core/internals/blocks.py @@ -909,13 +909,7 @@ def setitem(self, indexer, value): return block def putmask( - self, - mask, - new, - align: bool = True, - inplace: bool = False, - axis: int = 0, - transpose: bool = False, + self, mask, new, inplace: bool = False, axis: int = 0, transpose: bool = False, ): """ putmask the data to the block; it is possible that we may create a @@ -927,7 +921,6 @@ def putmask( ---------- mask : the condition to respect new : a ndarray/object - align : boolean, perform alignment on other/cond, default is True inplace : perform inplace modification, default is False axis : int transpose : boolean @@ -1312,13 +1305,7 @@ def shift(self, periods, axis: int = 0, fill_value=None): return [self.make_block(new_values)] def where( - self, - other, - cond, - align: bool = True, - errors="raise", - try_cast: bool = False, - axis: int = 0, + self, other, cond, errors="raise", try_cast: bool = False, axis: int = 0, ) -> List["Block"]: """ evaluate the block; return result block(s) from the result @@ -1327,8 +1314,6 @@ def where( ---------- other : a ndarray/object cond : the condition to respect - align : bool, default True - Perform alignment on other/cond. errors : str, {'raise', 'ignore'}, default 'raise' - ``raise`` : allow exceptions to be raised - ``ignore`` : suppress exceptions. On error return original object @@ -1394,12 +1379,7 @@ def where_func(cond, values, other): # we are explicitly ignoring errors block = self.coerce_to_target_dtype(other) blocks = block.where( - orig_other, - cond, - align=align, - errors=errors, - try_cast=try_cast, - axis=axis, + orig_other, cond, errors=errors, try_cast=try_cast, axis=axis, ) return self._maybe_downcast(blocks, "infer") @@ -1646,7 +1626,7 @@ def set(self, locs, values): self.values[:] = values def putmask( - self, mask, new, align=True, inplace=False, axis=0, transpose=False, + self, mask, new, inplace=False, axis=0, transpose=False, ): """ putmask the data to the block; we must be a single block and not @@ -1658,7 +1638,6 @@ def putmask( ---------- mask : the condition to respect new : a ndarray/object - align : boolean, perform alignment on other/cond, default is True inplace : perform inplace modification, default is False Returns @@ -1896,13 +1875,7 @@ def shift( ] def where( - self, - other, - cond, - align=True, - errors="raise", - try_cast: bool = False, - axis: int = 0, + self, other, cond, errors="raise", try_cast: bool = False, axis: int = 0, ) -> List["Block"]: if isinstance(other, ABCDataFrame): # ExtensionArrays are 1-D, so if we get here then