applying-function-with-multiple-arguments-to-create-a-new-pandas-column

PHOTO EMBED

Thu Jul 07 2022 15:36:18 GMT+0000 (Coordinated Universal Time)

Saved by @quaie

df["new_column"] = df.apply(lambda x: x["A"] * x["B"], axis = 1)
content_copyCOPY

https://stackoverflow.com/questions/19914937/applying-function-with-multiple-arguments-to-create-a-new-pandas-column