I have a dataframe
Date Name
1995 Harry
1995 John
1997 NaN
1995 NaN
1998 Nina
1998 NaN
1997 Carrie
I need to count a NaN/(not NaN) values for each Date. So the output should be
Date Nan/NaN+notNaN
1995 1/3
1997 1/2
1998 1/2
I was trying with
df.groupby(['Date']).agg({'Name' : 'count'})
but can i do the same with
df.groupby(['Date']).agg({'df.Name.isnull()' : 'count'}) or smth like that?