title: Using df.query on MultiIndex gives UndefinedVariableError
body: <p>I have two dataframes </p>
  
  <pre><code>df
  Out[162]: 
            colA  colB
  L0 L1 L2            
  A1 B1 C1     1     2
        C2     3     4
     B2 C1     5     6
        C2     7     8
  A2 B3 C1     9    10
        C2    11    12
     B4 C1    13    14
        C2    15    16
  
  df1
  Out[166]: 
                 rate
  from to            
  CHF  CHF   1.000000
       MXN  19.673256
       ZAR   0.000000
       XAU   0.000775
       THB  32.961405
  </code></pre>
  
  <p>When I did </p>
  
  <pre><code>df.query('L0=="A1" &amp; L2=="C1"')
  Out[167]: 
            colA  colB
  L0 L1 L2            
  A1 B1 C1     1     2
     B2 C1     5     6
  </code></pre>
  
  <p>Which give me back the expected out put .</p>
  
  <p>Then I want to apply the same function in df1</p>
  
  <pre><code>df1.query('ilevel_0=="CHF" &amp; ilevel_1=="MXN"') 
  </code></pre>
  
  <p>and </p>
  
  <pre><code>df1.query('from=="CHF" &amp; to=="MXN"') 
  </code></pre>
  
  <p>Both failed </p>
  
  <p>What happened here ? </p>
  
  <hr>
  
  <p>Data Input :</p>
  
  <pre><code>#df
  {'colA': {('A1', 'B1', 'C1'): 1,
    ('A1', 'B1', 'C2'): 3,
    ('A1', 'B2', 'C1'): 5,
    ('A1', 'B2', 'C2'): 7,
    ('A2', 'B3', 'C1'): 9,
    ('A2', 'B3', 'C2'): 11,
    ('A2', 'B4', 'C1'): 13,
    ('A2', 'B4', 'C2'): 15},
   'colB': {('A1', 'B1', 'C1'): 2,
    ('A1', 'B1', 'C2'): 4,
    ('A1', 'B2', 'C1'): 6,
    ('A1', 'B2', 'C2'): 8,
    ('A2', 'B3', 'C1'): 10,
    ('A2', 'B3', 'C2'): 12,
    ('A2', 'B4', 'C1'): 14,
    ('A2', 'B4', 'C2'): 16}}
  
  
  #df1
  {'rate': {('CHF', 'CHF'): 1.0,
  ('CHF', 'MXN'): 19.673256,
    ('CHF', 'THB'): 32.961405,
    ('CHF', 'XAU'): 0.000775,
    ('CHF', 'ZAR'): 0.0}}
  </code></pre>