merge two columns to list python code example Example: python transform two columns to a list combine df["pair_var"] = df[["var_1", "var_2"]].values.tolist()