📅  最后修改于: 2022-03-11 14:46:42.649000             🧑  作者: Mango
def some_func(row, var1):
return '{0}-{1}-{2}'.format(row['A'], row['B'], var1)
df['C'] = df.apply(some_func(row, var1='DOG'), axis=1)
df
A B C
0 foo x foo-x-DOG
1 bar y bar-y-DOG