Skip to content

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

Closed
@WillAyd

Description

@WillAyd

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions