Hey there,
I’m working in ‘applying labda to a row’, and I don’t understand why the following code should return a Syntax Error:
total_earned = lambda row:
row['hours_worked'] * 10
if row['hours_worked'] <= 40
else 400 + (row['hours_worked'] - 40)* 15
df['total_earned'] = df.apply(total_earned, axis = 1)
Thanks!