One fairly recurring pattern I have is creating a dataframe that combines another dataframe with its columns reversed. Here's a small example:
import pandas as pd
df = pd.DataFrame({"a": range(5), "b": range(6, 1, -1)})
combined = pd.concat([df, df.rename(columns={"a": "b", "b": "a"})], ignore_index=True)
Is there a more efficient approach to achieving this operation (esp. with many, many rows)?