I am creating a new column that will count all ids but exclude a few rows of customers where the customer's ID has a certain prefix and has no repeat orders
df['newcolumn'] = df[(df.notnull['Date']) & (df['ID'].str.contains('prefix')) & (df['Repeat order'] == 'No')].groupby(['ID'], as_index=False).count()
I am getting below error
TypeError: 'method' object is not subscriptable
Still no difference when I replaced [] with () to resolve above error
I also replaced df[(df['Date'].notnull) and got TypeError: unsupported operand type(s) for &: 'method' and 'bool' error