def merge_dfs(df_list, keys_for_merge):
  """Joins all the dataframes on the keys.

  Does an outer join, does not check that all rows exist in all dataframes.

  Args:
    df_list: A list of pandas dataframes. Each needs to have the keys_for_merge
      as columns.
    keys_for_merge: A string list of column names to merge on. Typically
      ['plate', 'well'] aka WELL_MERGE_KEYS.

  Returns:
    The joined pandas dataframe.
  """
  if len(df_list) < 1:
    raise ValueError('I need at least 1 df to merge')

  for k in keys_for_merge:
    if k not in df_list[0]:
      raise ValueError('df missing column %s. Has: %s' %
                       (k, df_list[0].columns))
  merged_df = df_list[0]

  for df in df_list[1:]:
    cols_to_add = keys_for_merge + [c for c in df.columns if c not in merged_df]
    for k in keys_for_merge:
      if k not in df:
        raise ValueError('df missing column %s. Has: %s' % (k, df[0].columns))
    merged_df = merged_df.merge(df[cols_to_add], on=keys_for_merge, how='outer')

  return merged_df