df.Last_3mth_Avg.isnull().groupby([df['ShopID'],df['ProductID']]).sum().astype(int).reset_index(name='count')
The code above help me to see the number of null values by shopid and productid. Question is df.Last_3mth_Avg.isnull()
becomes a series, how a groupby([df['ShopID'],df['ProductID']])
can be used afterwards?
I use the solution from: Pandas count null values in a groupby function