title: Filter dataframe by two columns in Pandas
body: <p>I have a dataframe <code>A</code>, contains hourly weather data for each city.</p>
  
  <pre><code>City  Hour  Temperature
  A      1      30
  A      2      32
  ...
  B      1      39
  B      2      40
  </code></pre>
  
  <p>I have another dataframe B, which indicates which record in <code>A</code> I am interested to analyze.</p>
  
  <pre><code>City  Hour  
  A      1     
  B      2     
  </code></pre>
  
  <p>How can I filter <code>A</code> by <code>B</code>?</p>
  
  <p>Expected output:</p>
  
  <pre><code>City  Hour  Temperature
  A      1      30
  B      2      40
  </code></pre>
  
  <p>Currently, I am using inner join.</p>