I have the following code:
group = df.groupby(['Id', 'Name'])
conditions = [
((group["Balance"]>0) & (group['Value']>0) & (group['L_Date']<=group['c_date'])),
((group["Balance"]==0) & (group['Value']==0) & (group['L_Date']<=group['c_date']))]
choices = ['Good', 'Bad']
df['outcome'] = np.select(conditions, choices, default='Normal')
But it is giving me the following error:
TypeError: '>' not supported between instances of 'SeriesGroupBy' and 'int'
What is the correct way to do this?