-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
DOC: Improve df.equals()
docstring
#56458
Conversation
linus-md
commented
Dec 11, 2023
•
edited
Loading
edited
- closes DOC: Improve DataFrame.equals docstring comparing index & column with extension dtypes #46507
Thanks @linus-md |
@mroeschke you speed at reviewing PRs is very impressive! Good job! 😄 |
Keep the doc improvement coming @linus-md! |
as the values are considered equal. Corresponding columns must be of | ||
the same dtype. | ||
as the values are considered equal. Corresponding columns and | ||
index must be of the same dtype. |
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 am not sure this is a good clarification? Because now this second sentence is contradicting with the first sentence ("row/column index do not need to have the same dtype") ..
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.
It also doesn't seem to be true that the index dtype has to be the same (as also shown in the examples section):
In [12]: s1 = pd.Series([1, 2, 3])
In [13]: s2 = pd.Series([1, 2, 3], index=pd.Index([0., 1., 2.]))
In [14]: s1.equals(s2)
Out[14]: True
In [15]: s1.index.dtype
Out[15]: dtype('int64')
In [16]: s2.index.dtype
Out[16]: dtype('float64')