-
-
Notifications
You must be signed in to change notification settings - Fork 146
Closed
Labels
ReshapingConcat, Merge/Join, Stack/Unstack, ExplodeConcat, Merge/Join, Stack/Unstack, Explodegood first issue
Description
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 withlevel: Level | list[Level] = ...
whileunstack
haslevel: Level = ...
while IMHO both should beIndexLabel
.
It seems as though the fix in #837 only touched groupby
.
Metadata
Metadata
Assignees
Labels
ReshapingConcat, Merge/Join, Stack/Unstack, ExplodeConcat, Merge/Join, Stack/Unstack, Explodegood first issue
Activity
Dr-Irv commentedon Jun 18, 2025
Yes, but we need an example that illustrates the issue with
unstack()
. Can you provide that?stephenlrandall commentedon Jun 19, 2025
@Dr-Irv Sure thing --
Dr-Irv commentedon Jun 19, 2025
Thanks for the report. PR welcome. It's an easy fix.
Series.unstack
,DataFrame.stack
, andDataFrame.unstack
#1259