print(pd.concat([df.ix[idxs].reset_index(drop=True) for df, idxs in zip([
    df_a, df_b], matches)], axis=1).to_csv())
how to perform an inner or outer join of DataFrames with Pandas on non-simplistic criterion