concatenate two dataframes columns and rename columns code example
Example 1: merge two columns name in one header pandas
df['A'] = df[a_cols].apply(' '.join, axis=1)
Example 2: merge two columns pandas
df["period"] = df["Year"] + df["quarter"]
df['A'] = df[a_cols].apply(' '.join, axis=1)
df["period"] = df["Year"] + df["quarter"]