-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST: Add test to verify 'dropna' behaviour on SparseArray #34879
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: Add test to verify 'dropna' behaviour on SparseArray #34879
Conversation
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! couple nitpicks, and CI failure is irrelevant.
verify that calling `dropna` on a pd.SparseArray does not inadvertently drop non-na records on both DataFrames and the SparseArray itself.
Thanks, incorporated the feedback! |
dropna
behaviour on pd.SparseArray
dropna
behaviour on pd.SparseArray
dropna
behaviour on pd.SparseArray
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 contribution!
The test you added looks good, but I think it would be nice to directly include a test for "invert" as well. See the comment from the original issues: #28287 (comment)
Isn't that already covered by pandas/pandas/tests/arrays/sparse/test_arithmetics.py Lines 466 to 480 in 72aed3e
|
That indeed looks to be the case, thanks for checking! |
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 update!
Co-authored-by: Joris Van den Bossche <[email protected]>
(failures are all the html failures) |
Thanks! |
verify that calling
dropna
on a pd.SparseArray does not inadvertently drop non-na records on both DataFrames and the SparseArray itself.black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff