title: Multilevel Slicing Pandas DataFrame
body: <p>I have 3 DataFrames:</p>
  
  <pre><code>import pandas as pd
  df1 =  pd.DataFrame( np.random.randn(100,4), index = pd.date_range('1/1/2010', periods=100), columns = {"A", "B", "C", "D"}).T.sort_index()
  df2 =  pd.DataFrame( np.random.randn(100,4), index = pd.date_range('1/1/2010', periods=100), columns = {"A", "B", "C", "D"}).T.sort_index()
  df3 =  pd.DataFrame( np.random.randn(100,4), index = pd.date_range('1/1/2010', periods=100), columns = {"A", "B", "C", "D"}).T.sort_index()
  </code></pre>
  
  <p>I concatenate them creating a DataFrame with multi levels:</p>
  
  <pre><code>df_c = pd.concat([df1, df2, df3], axis = 1, keys = ["df1", "df2", "df3"])
  </code></pre>
  
  <p>Swap levels and sort: </p>
  
  <pre><code>df_c.columns = df_c.columns.swaplevel(0,1)
  df_c = df_c.reindex_axis(sorted(df_c.columns), axis = 1)
  
  
  ipdb&gt; df_c
      2010-01-01                     2010-01-02
       df1       df2       df3        df1       df2       df3
  A  -0.798407  0.124091  0.271089   0.754759 -0.575769  1.501942
  B   0.602091 -0.415828  0.152780   0.530525  0.118447  0.057240
  C  -0.440619 -1.074837 -0.618084   0.627520 -1.298814  1.029443
  D  -0.242851 -0.738948 -1.312393   0.559021  0.196936 -1.074277
  </code></pre>
  
  <p>I would like to slice it to get values for individual rows, but so far I have only achieved such a degree of slicing:</p>
  
  <pre><code>cols = df_c.T.index.get_level_values(0)
  
  ipdb&gt; df_c.xs(cols[0], axis = 1, level = 0)
          df1       df2       df3
  A -0.798407  0.124091  0.271089
  B  0.602091 -0.415828  0.152780
  C -0.440619 -1.074837 -0.618084
  D -0.242851 -0.738948 -1.312393
  </code></pre>
  
  <p>The only way I found to get the values for each raw is to define a new dataframe,</p>
  
  <pre><code>   slcd_df = df_c.xs(cols[0], axis = 1, level = 0)
  </code></pre>
  
  <p>and then select rows using the usual proceadure: </p>
  
  <pre><code>  ipdb&gt; slcd_df.ix["A", :]
    df1   -0.798407
    df2    0.124091
    df3    0.271089
  </code></pre>
  
  <p>But I was wondering whether there exists a better (meaning faster and more elegant) way to slice multilevel Dataframes. </p>