Skip to content

Replace _has_complex_internals with isinstance(..., ABCMultiIndex) #29227

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

Closed
WillAyd opened this issue Oct 25, 2019 · 0 comments · Fixed by #29237
Closed

Replace _has_complex_internals with isinstance(..., ABCMultiIndex) #29227

WillAyd opened this issue Oct 25, 2019 · 0 comments · Fixed by #29237
Labels
Milestone

Comments

@WillAyd
Copy link
Member

WillAyd commented Oct 25, 2019

I've stumbled across this code a few times in groupby and it took me a while to grasp. I'm pretty sure this always evaluates to False, unless we are dealing with a MultiIndex.

For code clarity, I think it would be better if we just did an isinstance check as I don't think the intent of _has_complex_internals is very clear

@WillAyd WillAyd added the Clean label Oct 25, 2019
Aivengoe added a commit to Aivengoe/pandas that referenced this issue Oct 26, 2019
jbrockmendel pushed a commit to Aivengoe/pandas that referenced this issue Nov 12, 2019
@jreback jreback added this to the 1.0 milestone Nov 14, 2019
Reksbril pushed a commit to Reksbril/pandas that referenced this issue Nov 18, 2019
proost pushed a commit to proost/pandas that referenced this issue Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this issue Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants