add a column to a python dataframe summing other columns code example Example: sum two columns pandas sum_column = df["col1"] + df["col2"]