Skip to content

Commit 23dcab5

Browse files
DOC: Docstring updated for DataFrame.equals (#34508)
Co-authored-by: Joris Van den Bossche <[email protected]>
1 parent 1922ec4 commit 23dcab5

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

pandas/core/generic.py

+5-10
Original file line numberDiff line numberDiff line change
@@ -1201,9 +1201,11 @@ def equals(self, other):
12011201
12021202
This function allows two Series or DataFrames to be compared against
12031203
each other to see if they have the same shape and elements. NaNs in
1204-
the same location are considered equal. The column headers do not
1205-
need to have the same type, but the elements within the columns must
1206-
be the same dtype.
1204+
the same location are considered equal.
1205+
1206+
The row/column index do not need to have the same type, as long
1207+
as the values are considered equal. Corresponding columns must be of
1208+
the same dtype.
12071209
12081210
Parameters
12091211
----------
@@ -1232,13 +1234,6 @@ def equals(self, other):
12321234
numpy.array_equal : Return True if two arrays have the same shape
12331235
and elements, False otherwise.
12341236
1235-
Notes
1236-
-----
1237-
This function requires that the elements have the same dtype as their
1238-
respective elements in the other Series or DataFrame. However, the
1239-
column labels do not need to have the same type, as long as they are
1240-
still considered equal.
1241-
12421237
Examples
12431238
--------
12441239
>>> df = pd.DataFrame({1: [10], 2: [20]})

0 commit comments

Comments
 (0)