title: How to select rows of a dataframe using MultiIndex in Pandas
body: <p>I have this two dataframes I need to relate.</p>
  <p>The first one, HOLIDAYS, gives me local holiday dates and the stores code in which they're celebrated</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;">Holiday date</th>
  <th style="text-align: center;">Store code</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">01/02</td>
  <td style="text-align: center;">18005</td>
  </tr>
  <tr>
  <td style="text-align: left;">01/02</td>
  <td style="text-align: center;">18032</td>
  </tr>
  <tr>
  <td style="text-align: left;">...</td>
  <td style="text-align: center;">...</td>
  </tr>
  <tr>
  <td style="text-align: left;">31/03</td>
  <td style="text-align: center;">18043</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>The second one, BALANCE, shows balance of stores in certain dates with date and number stores as index.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th style="text-align: left;"></th>
  <th style="text-align: center;"></th>
  <th style="text-align: center;">balance</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td style="text-align: left;">01/02</td>
  <td style="text-align: center;"><em>18001</em></td>
  <td style="text-align: center;">$35,00</td>
  </tr>
  <tr>
  <td style="text-align: left;">01/02</td>
  <td style="text-align: center;">18002</td>
  <td style="text-align: center;">$38,00</td>
  </tr>
  <tr>
  <td style="text-align: left;">...</td>
  <td style="text-align: center;">...</td>
  <td style="text-align: center;">...</td>
  </tr>
  <tr>
  <td style="text-align: left;">31/03</td>
  <td style="text-align: center;">18099</td>
  <td style="text-align: center;">$20,45</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>What I need to do is to create a column in BALANCE named <em>Holiday</em> with a boolean value showing if a certain row is showing a balance obtained during a holiday or not.</p>
  <p>I tried to create the column 'Holiday' setting the initial value as False and then assigning every value of HOLIDAY in index of BALANCE dataframe to True, I'm getting ValueError (possibly because a dataframe cannot be passed as index of other). I tried to convert HOLIDAY to MultiIndex but again it's not working.</p>
  <pre class="lang-py prettyprint-override"><code>BALANCE['Holiday'] = False
  H = pd.MultiIndex.from_frame(HOLIDAY)
  BALANCE.loc[H, 'Holiday'] = True
  </code></pre>
  <p>I'm pretty sure this should not be difficult but I'm out of ideas now. There is any way I could work with the first dataframe as MultiIndex of the second?</p>