Does anyone know if it is possible to use the DataFrame.loc method to select from a MultiIndex? I have the following DataFrame and would like to be able to access the values
Try the cross-section indexing:
In [68]: df.xs('at', level='QGram', drop_level=False).loc[[1,4]] Out[68]: Char Dwell Flight ND_Offset Offset QGram at 1 t 180 0 0.108363 5 4 a 20 180 0.000000 0