title: Using pandas to select rows using two different columns from dataframe?
body: <p>Q is similar to this:
  <a href="https://stackoverflow.com/questions/12096252/use-a-list-of-values-to-select-rows-from-a-pandas-dataframe">use a list of values to select rows from a pandas dataframe</a></p>
  
  <p>I want to dataframe if either value in two columns are in a list.
  Return both columns (combine results of #1 and #4. </p>
  
  <pre><code>import numpy as np
  from pandas import *
  
  
  d = {'one' : [1., 2., 3., 4] ,'two' : [5., 6., 7., 8.],'three' : [9., 16., 17., 18.]}
  
  df = DataFrame(d)
  print df
  
  checkList = [1,7]
  
  print df[df.one == 1 ]#1
  print df[df.one == 7 ]#2
  print df[df.two == 1 ]#3
  print df[df.two == 7 ]#4
  
  #print df[df.one == 1 or df.two ==7]
  print df[df.one.isin(checkList)]
  </code></pre>