BUG: In Multilevel.dtypes when level name is not specified it gives wrong output #38580
Closed
2 tasks done
Labels
Milestone
I have checked that this issue has not already been reported.
(optional) I have confirmed this bug exists on the master branch of pandas.
There was a recent PR to add
MultiIndex.dtypes
#37073 but this only works when each level is named.pandas/pandas/core/indexes/multi.py
Lines 703 to 710 in 03e1c89
If
level
has no name then,level.name
would beNone
.Example where it fails:
When level is unamed i.e
None
may be we can addlevel_0
,level_1
etc. this would be consistent with API too(reset_index
would addlevel_x
).@jreback
@arw2019
The text was updated successfully, but these errors were encountered: