use lamba to apply function in python dataframe column and create new column code example
Example: use apply with lambda pandas
df.apply(lambda x: func(x['col1'],x['col2']),axis=1)
df.apply(lambda x: func(x['col1'],x['col2']),axis=1)