-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
BUG: Fix drop_duplicates failure when DataFrame has no column #20974
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
BUG: Fix drop_duplicates failure when DataFrame has no column #20974
Conversation
Codecov Report
@@ Coverage Diff @@
## master #20974 +/- ##
==========================================
- Coverage 91.82% 91.81% -0.01%
==========================================
Files 153 153
Lines 49483 49485 +2
==========================================
Hits 45437 45437
- Misses 4046 4048 +2
Continue to review full report at Codecov.
|
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.
can you add a whatsnew note
@@ -4354,6 +4354,9 @@ def duplicated(self, subset=None, keep='first'): | |||
from pandas.core.sorting import get_group_index | |||
from pandas._libs.hashtable import duplicated_int64, _SIZE_HINT_LIMIT | |||
|
|||
if self.columns.empty: | |||
return Series() |
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.
dtype='bool'
?
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.
Good to be explicit here. We'll be changing this from float
to object
soon.
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.
can you update & add a whatsnew note
0.23.2 is good. |
@Licht-T if you can update to comments we can put in 0.23.2 |
can u rebase |
closing in favor of #22394 |
git diff upstream/master -u -- "*.py" | flake8 --diff