I have this set of data:
UserID AccountNum
A001 12345
A001 NaN
A001 56789
My wish output is like this, I want to count number of AccNum but I don't want to count the null value
UserID TotalAccNum
A001 2
I have tried this query:
data.groupby('UserID').agg({'AccountNum': ['count']})