I'm learning data analysis while performing vectorized operation with lambda function it run at first but again run it shows error as TypeError: <lambda>() takes 1 positional argument but 2 were given
sample data of tips.csv file
quality = lambda x:'Generous' if x['tip']/x['total_bill']>0.25 else 'Other'
This is the image that I run first which doesn't show any error
a = np.vectorize(quality)
df['q2'] = a(df['total_bill'],df['tip'])
df['q1'] = np.vectorize(quality)(df['total_bill'],df['tip'])


