add two columns in pandas dataframe site:stackoverflow.com code example Example: sum two columns pandas sum_column = df["col1"] + df["col2"]