-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Error with .drop([]) on non-unique index #16428
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
Error with .drop([]) on non-unique index #16428
Conversation
Where does the |
This can be 0.20.2 since it's a bugfix |
Done, plz let me know if you need anything else on my end |
doc/source/whatsnew/v0.20.2.txt
Outdated
@@ -93,3 +93,5 @@ Categorical | |||
|
|||
Other | |||
^^^^^ | |||
|
|||
- Fix ``pd.drop([])`` for dataframes with non-unique indices (:issue:`16270`) |
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.
Bug in df.drop([])
for DataFrame with non-unique indices
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.
pls add the test from the issue.
@lloydkirk can you update with a test and fix the note in the whatsnew? The test can go in |
Codecov Report
@@ Coverage Diff @@
## master #16428 +/- ##
==========================================
- Coverage 90.42% 90.42% -0.01%
==========================================
Files 161 161
Lines 51023 51023
==========================================
- Hits 46138 46137 -1
- Misses 4885 4886 +1
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #16428 +/- ##
==========================================
- Coverage 90.42% 90.42% -0.01%
==========================================
Files 161 161
Lines 51023 51023
==========================================
- Hits 46138 46137 -1
- Misses 4885 4886 +1
Continue to review full report at Codecov.
|
Done, added a test to |
thanks! |
(cherry picked from commit b0a51df)
(cherry picked from commit b0a51df)
Wraps the labels array in
_ensure_object
. The labels array is being cast to a float by default, causing the error raised in #16398.git diff upstream/master --name-only -- '*.py' | flake8 --diff