title: How to remove rows based on another Dataframe?
body: <p>I've been working with pandas for a while but I haven't figured out how to achieve the following result.</p>
  
  <p>DF A consists of records that contain active and inactive LOB. I want to remove the inactive LOBs. But the inactive LOBs differ between states. </p>
  
  <p>DF B consists of States as columns and the inactive LOBs in the resulting columns. </p>
  
  <p>So, I want a resulting DF which does not contain any inactive LOBs.</p>
  
  <p>ex: an LOB 78 inactive in OH could be active in MI.
  Reasoning:</p>
  
  <p>In the DF a: you can see a record with state OH, and LOB 78. I do not want this record in the DF C because it is considered inactive due to 78 existing in the column OH in DF b.</p>
  
  <p>In DF a: you can see a record with state MI, and LOB 78. I want the record in my DF C because there is no 78 in the column MI in DF b</p>
  
  <p>DF A has 500k records in it. Time to run isn't an issue, but it would be great if it was less than 5 minutes. </p>
  
  <p>(I read DF B from a list of <code>dict : [{state: [list of inactive lob]}]</code> )</p>
  
  <p>Sample DF A:</p>
  
  <pre><code>Name, state, LOB, ID
  a   , OH   , 66 , 7979
  aa  , OH   , 78 , 12341
  bas , OH   , 67 , 13434
  basd, VT   , 99 , 1241234
  badf, MI   , 77 , 12341234
  bbdf, MI   , 78 , 12341234
  caff, VT   , 66 , 2134
  cdse, AZ   , 01 , 232
  </code></pre>
  
  <p>sample DF B:</p>
  
  <pre><code>    OH  ,  VT  ,  MI
      66  ,  99  ,  77
      78  ,  23
  </code></pre>
  
  <p>I want a DF C:</p>
  
  <pre><code>Name, state, LOB, ID
  bas , OH   , 67 , 13434
  bbdf, MI   , 78 , 12341234
  caff, VT   , 66 , 2134
  cdse, AZ   , 01 , 232
  </code></pre>