def equals(self, other):
    '\n        Test whether two objects contain the same elements.\n\n        This function allows two Series or DataFrames to be compared against\n        each other to see if they have the same shape and elements. NaNs in\n        the same location are considered equal. The column headers do not\n        need to have the same type, but the elements within the columns must\n        be the same dtype.\n\n        Parameters\n        ----------\n        other : Series or DataFrame\n            The other Series or DataFrame to be compared with the first.\n\n        Returns\n        -------\n        bool\n            True if all elements are the same in both objects, False\n            otherwise.\n\n        See Also\n        --------\n        Series.eq : Compare two Series objects of the same length\n            and return a Series where each element is True if the element\n            in each Series is equal, False otherwise.\n        DataFrame.eq : Compare two DataFrame objects of the same shape and\n            return a DataFrame where each element is True if the respective\n            element in each DataFrame is equal, False otherwise.\n        assert_series_equal : Return True if left and right Series are equal,\n            False otherwise.\n        assert_frame_equal : Return True if left and right DataFrames are\n            equal, False otherwise.\n        numpy.array_equal : Return True if two arrays have the same shape\n            and elements, False otherwise.\n\n        Notes\n        -----\n        This function requires that the elements have the same dtype as their\n        respective elements in the other Series or DataFrame. However, the\n        column labels do not need to have the same type, as long as they are\n        still considered equal.\n\n        Examples\n        --------\n        >>> df = pd.DataFrame({1: [10], 2: [20]})\n        >>> df\n            1   2\n        0  10  20\n\n        DataFrames df and exactly_equal have the same types and values for\n        their elements and column labels, which will return True.\n\n        >>> exactly_equal = pd.DataFrame({1: [10], 2: [20]})\n        >>> exactly_equal\n            1   2\n        0  10  20\n        >>> df.equals(exactly_equal)\n        True\n\n        DataFrames df and different_column_type have the same element\n        types and values, but have different types for the column labels,\n        which will still return True.\n\n        >>> different_column_type = pd.DataFrame({1.0: [10], 2.0: [20]})\n        >>> different_column_type\n           1.0  2.0\n        0   10   20\n        >>> df.equals(different_column_type)\n        True\n\n        DataFrames df and different_data_type have different types for the\n        same values for their elements, and will return False even though\n        their column labels are the same values and types.\n\n        >>> different_data_type = pd.DataFrame({1: [10.0], 2: [20.0]})\n        >>> different_data_type\n              1     2\n        0  10.0  20.0\n        >>> df.equals(different_data_type)\n        False\n        '
    if (not isinstance(other, self._constructor)):
        return False
    return self._data.equals(other._data)
Test whether two objects contain the same elements.

This function allows two Series or DataFrames to be compared against
each other to see if they have the same shape and elements. NaNs in
the same location are considered equal. The column headers do not
need to have the same type, but the elements within the columns must
be the same dtype.

Parameters
----------
other : Series or DataFrame
    The other Series or DataFrame to be compared with the first.

Returns
-------
bool
    True if all elements are the same in both objects, False
    otherwise.

See Also
--------
Series.eq : Compare two Series objects of the same length
    and return a Series where each element is True if the element
    in each Series is equal, False otherwise.
DataFrame.eq : Compare two DataFrame objects of the same shape and
    return a DataFrame where each element is True if the respective
    element in each DataFrame is equal, False otherwise.
assert_series_equal : Return True if left and right Series are equal,
    False otherwise.
assert_frame_equal : Return True if left and right DataFrames are
    equal, False otherwise.
numpy.array_equal : Return True if two arrays have the same shape
    and elements, False otherwise.

Notes
-----
This function requires that the elements have the same dtype as their
respective elements in the other Series or DataFrame. However, the
column labels do not need to have the same type, as long as they are
still considered equal.

Examples
--------
>>> df = pd.DataFrame({1: [10], 2: [20]})
>>> df
    1   2
0  10  20

DataFrames df and exactly_equal have the same types and values for
their elements and column labels, which will return True.

>>> exactly_equal = pd.DataFrame({1: [10], 2: [20]})
>>> exactly_equal
    1   2
0  10  20
>>> df.equals(exactly_equal)
True

DataFrames df and different_column_type have the same element
types and values, but have different types for the column labels,
which will still return True.

>>> different_column_type = pd.DataFrame({1.0: [10], 2.0: [20]})
>>> different_column_type
   1.0  2.0
0   10   20
>>> df.equals(different_column_type)
True

DataFrames df and different_data_type have different types for the
same values for their elements, and will return False even though
their column labels are the same values and types.

>>> different_data_type = pd.DataFrame({1: [10.0], 2: [20.0]})
>>> different_data_type
      1     2
0  10.0  20.0
>>> df.equals(different_data_type)
False
def equals(self, other):
    '\n        Test whether two objects contain the same elements.\n\n        This function allows two Series or DataFrames to be compared against\n        each other to see if they have the same shape and elements. NaNs in\n        the same location are considered equal. The column headers do not\n        need to have the same type, but the elements within the columns must\n        be the same dtype.\n\n        Parameters\n        ----------\n        other : Series or DataFrame\n            The other Series or DataFrame to be compared with the first.\n\n        Returns\n        -------\n        bool\n            True if all elements are the same in both objects, False\n            otherwise.\n\n        See Also\n        --------\n        Series.eq : Compare two Series objects of the same length\n            and return a Series where each element is True if the element\n            in each Series is equal, False otherwise.\n        DataFrame.eq : Compare two DataFrame objects of the same shape and\n            return a DataFrame where each element is True if the respective\n            element in each DataFrame is equal, False otherwise.\n        assert_series_equal : Return True if left and right Series are equal,\n            False otherwise.\n        assert_frame_equal : Return True if left and right DataFrames are\n            equal, False otherwise.\n        numpy.array_equal : Return True if two arrays have the same shape\n            and elements, False otherwise.\n\n        Notes\n        -----\n        This function requires that the elements have the same dtype as their\n        respective elements in the other Series or DataFrame. However, the\n        column labels do not need to have the same type, as long as they are\n        still considered equal.\n\n        Examples\n        --------\n        >>> df = pd.DataFrame({1: [10], 2: [20]})\n        >>> df\n            1   2\n        0  10  20\n\n        DataFrames df and exactly_equal have the same types and values for\n        their elements and column labels, which will return True.\n\n        >>> exactly_equal = pd.DataFrame({1: [10], 2: [20]})\n        >>> exactly_equal\n            1   2\n        0  10  20\n        >>> df.equals(exactly_equal)\n        True\n\n        DataFrames df and different_column_type have the same element\n        types and values, but have different types for the column labels,\n        which will still return True.\n\n        >>> different_column_type = pd.DataFrame({1.0: [10], 2.0: [20]})\n        >>> different_column_type\n           1.0  2.0\n        0   10   20\n        >>> df.equals(different_column_type)\n        True\n\n        DataFrames df and different_data_type have different types for the\n        same values for their elements, and will return False even though\n        their column labels are the same values and types.\n\n        >>> different_data_type = pd.DataFrame({1: [10.0], 2: [20.0]})\n        >>> different_data_type\n              1     2\n        0  10.0  20.0\n        >>> df.equals(different_data_type)\n        False\n        '
    if (not isinstance(other, self._constructor)):
        return False
    return self._data.equals(other._data)