-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
TST: GH 32431 check print label indexing on nan #36635
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
TST: GH 32431 check print label indexing on nan #36635
Conversation
WillAyd
left a comment
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.
Cool looks pretty good - thanks for the first contribution. Just a small change needed I think
| # GH 32431 | ||
| df = pd.Series([1, "{1,2}", 1, None]) | ||
| vc = df.value_counts(dropna=False) | ||
| print(vc.loc[np.nan]) |
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.
Rather than just printing you should construct the expected result and use tm.assert_series_equal(result, expected) - you should see this idiom throughout the test modules if you need a reference
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.
Thanks for the feedback! I constructed the expected result and expected an int. So I compared the results just with a normal assert, since I couldn't find a method on tm to assert ints. Please let me know if this satisfies your request
WillAyd
left a comment
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.
See above
WillAyd
left a comment
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.
lgtm @jreback
|
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this. |
|
thanks @wesleyboelrijk |
black pandasgit diff upstream/master -u -- "*.py" | flake8 --diffThis is my first contribution to pandas. I added a simple test that was requested in one of the open issues.