pandas merge row by rows code example Example: combine df columns python df["period"] = df["Year"] + df["quarter"]