title: filter pandas dataframe on one level of a multi level index
body: <p>If I have a pandas dataframe with a multi level index, how can I filter by one of the levels of that index. For example:</p>
  
  <pre><code>df = pd.DataFrame({"id": [1,2,1,2], "time": [1, 1, 2, 2], "val": [1,2,3,4]})
  df.set_index(keys=["id", "time"], inplace=True)
  </code></pre>
  
  <p>I would like to do something like:</p>
  
  <pre><code>df[df["time"] &gt; 1]
  </code></pre>
  
  <p>but <code>time</code> is no longer a column. I could keep it as a column but I don't want to drag around copies of data. </p>