df['expens'] = df.apply(lambda z : z['total_bill'] * 2 if z['total_bill'] < 10 ,axis = 1)
I want to apply the lambda expression using the if condition and create new column variable df['expens']
under the condition if df['total_bill] is < 10
I tried the above the python syntax but is throws an error "invalid syntax"