title: Select rows from pandas df, where index appears somewhere in another df
body: <p>Assume the following:</p>
  
  <p>df1:    </p>
  
  <pre><code>x    y     z
  1    10    11
  2    20    22
  3    30    33
  4    40    44
  1    20    21
  1    30    31
  1    40    41
  2    10    12
  2    30    32
  2    40    42
  3    10    31
  3    20    23
  3    40    43
  4    10    14
  4    20    24
  4    30    34
  </code></pre>
  
  <p>df2:</p>
  
  <pre><code>x    b
  1    100
  2    200
  </code></pre>
  
  <p>df3:</p>
  
  <pre><code>y    c
  10   1000
  20   2000
  </code></pre>
  
  <p>I want all rows from <code>df1</code>, for which either <code>x</code> or <code>y</code> appears in either <code>df2</code> or <code>df3</code> respectively, meaning in this case</p>
  
  <p>out:</p>
  
  <pre><code>x    y     z
  1    10    11
  2    20    22
  1    20    21
  1    30    31
  1    40    41
  2    10    12
  2    30    32
  2    40    42
  3    10    31
  3    20    23
  4    10    14
  4    20    24
  </code></pre>
  
  <p>I would like to do this in pure pandas, with no for loops, seems standard enough to me, but I don't really know what to look for</p>