-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: Docstring updated for DataFrame.equals #34508
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
c442c13
Docstring updated for DataFrame.equals
pandeydeepak0 025cdf5
Docstring updated for DataFrame.equals
pandeydeepak0 f6909fd
removed Notes
pandeydeepak0 17d21db
removed Notes
pandeydeepak0 defaf2e
Update pandas/core/generic.py
jorisvandenbossche d086235
fix whitespace
jorisvandenbossche a00a1b9
Merge remote-tracking branch 'upstream/master' into freakypandit-master
jorisvandenbossche File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1247,9 +1247,12 @@ def equals(self, other): | |
|
||
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. | ||
the same location are considered equal. | ||
|
||
The row/column index do not need to have the same type, as long | ||
as the values are still considered equal. | ||
jorisvandenbossche marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. you can leave the blank line here |
||
The elements within the columns must be the same dtype. | ||
|
||
Parameters | ||
---------- | ||
|
@@ -1278,13 +1281,6 @@ def equals(self, other): | |
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]}) | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel the "still" can be removed. This was used in a different context under "Notes". It makes the sentence slightly confusing when used here. So we will have "as long as the values are considered equal".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@fujiaxiang added your suggestion, thanks!