📅  最后修改于: 2022-03-11 14:47:15.292000             🧑  作者: Mango
import pandas as pd
#Here a and b are existing columns
df['c'] = df.apply(lambda row: row.a + row.b, axis=1)
df
# a b c
# 0 1 3 4
# 1 2 4 6