title: list of columns in common in two pandas dataframes
body: <p>I'm considering merge operations on dataframes each with a large number of columns. Don't want the result to have two columns with the same name. Am trying to view a list of column names in common between the two frames:</p>
  
  <pre><code>import pandas as pd
  
  a = [{'A': 3, 'B': 5, 'C': 3, 'D': 2},{'A': 2,  'B': 4, 'C': 3, 'D': 9}]
  df1 = pd.DataFrame(a)
  b = [{'F': 0,  'M': 4,  'B': 2,  'C': 8 },{'F': 2,  'M': 4, 'B': 3, 'C': 9}]
  df2 = pd.DataFrame(b)
  
  df1.columns
  &gt;&gt; Index(['A', 'B', 'C', 'D'], dtype='object')
  df2.columns
  &gt;&gt; Index(['B', 'C', 'F', 'M'], dtype='object')
  
  (df2.columns).isin(df1.columns)
  &gt;&gt; array([ True,  True, False, False])
  </code></pre>
  
  <p>How do I operate that NumPy boolean array on the Index object so it just gives back a list of the columns in common?</p>