У меня есть следующий код:
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')
Но он выдает мне следующую ошибку:
TypeError: '>' not supported between instances of 'SeriesGroupBy' and 'int'
Как правильно это сделать?