-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Fix assert frame equal na dtype false 61473 #62672
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
Fix assert frame equal na dtype false 61473 #62672
Conversation
| ^^^^^ | ||
| - Bug in :class:`DataFrame` when passing a ``dict`` with a NA scalar and ``columns`` that would always return ``np.nan`` (:issue:`57205`) | ||
| - Bug in :class:`Series` ignoring errors when trying to convert :class:`Series` input data to the given ``dtype`` (:issue:`60728`) | ||
| - Bug in :func:`assert_frame_equal` fails when comparing two DFs containing pd.NA that only differ in dtype and dtype is false (:issue:`61473`) |
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.
"in dtype and dtype is false" is odd phrasing
DFs -> ```:class:DataFrames````
fails -> failing
| Second Series to compare. | ||
| check_dtype : bool, default True | ||
| Whether to check the Series dtype is identical. | ||
| check_dtype : bool, if False |
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.
check_dtype is already there 2 lines up
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.
also the default is still True
| if not check_dtype and (left.dtype != right.dtype): | ||
| # checks only when check_dtype is False #GH #61473 | ||
| lv, rv = left._values, right._values | ||
| lv = np.asarray(lv, dtype=object) |
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.
this is going to be really expensive. no other alternatives?
| ).rename(columns={"B": "A"}) | ||
| df = DataFrame({"A": range(3), "B": range(3), "C": range(3)}).rename( | ||
| columns={"B": "A"} | ||
| ) |
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.
these changes look unrelated. please revert
|
I am closing this PR |
doc/source/whatsnew/v3.0.0.rstfile if fixing a bug or adding a new feature.