Skip to content

Added "." on to check_dtype and obj parameter #44446

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 3 commits into from
Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pandas/_testing/asserters.py
Original file line number Diff line number Diff line change
Expand Up @@ -540,15 +540,15 @@ def assert_categorical_equal(
left : Categorical
right : Categorical
check_dtype : bool, default True
Check that integer dtype of the codes are the same
Check that integer dtype of the codes are the same.
check_category_order : bool, default True
Whether the order of the categories should be compared, which
implies identical integer codes. If False, only the resulting
values are compared. The ordered attribute is
checked regardless.
obj : str, default 'Categorical'
Specify object name being compared, internally used to show appropriate
assertion message
assertion message.
"""
_check_isinstance(left, right, Categorical)

Expand Down
6 changes: 3 additions & 3 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -10563,13 +10563,13 @@ def isin(self, values) -> DataFrame:

When ``values`` is a Series or DataFrame the index and column must
match. Note that 'falcon' does not match based on the number of legs
in df2.
in other.

>>> other = pd.DataFrame({'num_legs': [8, 2], 'num_wings': [0, 2]},
>>> other = pd.DataFrame({'num_legs': [8, 3], 'num_wings': [0, 2]},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you change this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't change these lines actually I only added the "." at the end of description of "check_dtype" and "obj". These changes are from a different issue that I solved and my PR got merged but I have no idea why these commits got pushed with this PR. You can have a look at this PR for better understanding - https://github.com/pandas-dev/pandas/pull/43820/files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do let me know what would I have to do in order to get rid of these extra commits.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simply revert the relevant commit on your branch

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something like

git fetch upstream
git rebase upstream/master
git push origin HEAD -f

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! Kindly review it again.

... index=['spider', 'falcon'])
>>> df.isin(other)
num_legs num_wings
falcon True True
falcon False True
dog False False
"""
if isinstance(values, dict):
Expand Down