Selecting rows in a MultiIndex dataframe by index without losing any levels
问题 I would like to select a row called 'Mid', without losing it's index 'Site' Following code shows the dataframe: m.commodity price max maxperstep Site Commodity Type Mid Biomass Stock 6.0 inf inf CO2 Env 0.0 inf inf Coal Stock 7.0 inf inf Elec Demand NaN NaN NaN Gas Stock 27.0 inf inf Hydro SupIm NaN NaN NaN Lignite Stock 4.0 inf inf Slack Stock 999.0 inf inf Solar SupIm NaN NaN NaN Wind SupIm NaN NaN NaN North Biomass Stock 6.0 inf inf CO2 Env 0.0 inf inf Coal Stock 7.0 inf inf Elec Demand