Skip to content

Incorrect type for Series.unstack #1256

Open
@stephenlrandall

Description

@stephenlrandall

Describe the bug

As noted in #703, providing a list of ints or strings to unstack leads to a type error:

I've identified a few places (see attachment). However, I am not sure the patch is correct/complete. It is interesting to see that stack is annotated with level: Level | list[Level] = ... while unstack has level: Level = ... while IMHO both should be IndexLabel.

It seems as though the fix in #837 only touched groupby.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions