modin/pandas/series.py
def compare(
        self,
        other: "Series",
        align_axis: Union[str, int] = 1,
        keep_shape: bool = False,
        keep_equal: bool = False,
    ):  # noqa: PR01, RT01, D200
        """
        Compare to another Series and show the differences.
        """
        if not isinstance(other, Series):
            raise TypeError(f"Cannot compare Series to {type(other)}")
        result = self.to_frame().compare(
            other.to_frame(),
            align_axis=align_axis,
            keep_shape=keep_shape,
            keep_equal=keep_equal,
        )
        if align_axis == "columns" or align_axis == 1:
            # Pandas.DataFrame.Compare returns a dataframe with a multidimensional index object as the
            # columns so we have to change column object back.
            result.columns = pandas.Index(["self", "other"])
        else:
            result = result.squeeze().rename(None)
        return result

        Compare to another Series and show the differences.
        
Compare to another Series and show the differences.
Compare to another Series and show the differences .
def compare(
        self,
        other: "Series",
        align_axis: Union[str, int] = 1,
        keep_shape: bool = False,
        keep_equal: bool = False,
    ):  
        if not isinstance(other, Series):
            raise TypeError(f"Cannot compare Series to {type(other)}")
        result = self.to_frame().compare(
            other.to_frame(),
            align_axis=align_axis,
            keep_shape=keep_shape,
            keep_equal=keep_equal,
        )
        if align_axis == "columns" or align_axis == 1:
            result.columns = pandas.Index(["self", "other"])
        else:
            result = result.squeeze().rename(None)
        return result
def compare ( self , other : "Series" , align_axis : Union [ str , int ] = 1 , keep_shape : bool = False , keep_equal : bool = False , ) : if not isinstance ( other , Series ) : raise TypeError ( f"Cannot compare Series to {type(other)}" ) result = self . to_frame ( ) . compare ( other . to_frame ( ) , align_axis = align_axis , keep_shape = keep_shape , keep_equal = keep_equal , ) if align_axis == "columns" or align_axis == 1 : result . columns = pandas . Index ( [ "self" , "other" ] ) else : result = result . squeeze ( ) . rename ( None ) return result
Compare to another Series and show the differences.
Compare to another Series and show the differences .
# noqa: PR01, RT01, D200 """
        Compare to another Series and show the differences.
        """ # Pandas.DataFrame.Compare returns a dataframe with a multidimensional index object as the # columns so we have to change column object back.
self
other
"Series"
align_axis
Union[str, int]
keep_shape
bool
keep_equal
bool