def makeDFWithCommonColumns(df1, df2):
  """
  Returns dataframes that have columns in common.
  """
  columns = set(df1.columns).intersection(df2.columns)
  df1_sub = df1.copy()
  df2_sub = df2.copy()
  df1_sub = df1_sub[columns]
  df2_sub = df2_sub[columns]
  return df1_sub, df2_sub