merge two rows with data to one pandas code example Example: combine df columns python df["period"] = df["Year"] + df["quarter"]