Skip to content

inconsistent indexing behaviour with multi index #5725

Closed
@behzadnouri

Description

@behzadnouri

i have a dataframe with multi-index as

>>> df
              val  diffs
tag day                 
A   26   0.208105    NaN
    37   2.709899    NaN
    57   0.933981    NaN
B   75   0.624029    NaN
C   0   -1.645489    NaN
    27  -1.749618    NaN
    27  -0.725497    NaN
    37  -0.381485    NaN
    67   0.110426    NaN
    82   1.253857    NaN

[10 rows x 2 columns]

however

>>> df.val[ 'A' ]
A   NaN
Name: val, dtype: float64
>>> df.val[ 'X' ]
X   NaN
Name: val, dtype: float64



>>> pd.__version__
'0.13.0rc1-92-gf6fd509'

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugIndexingRelated to indexing on series/frames, not to indexes themselvesMultiIndex

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions