I have a problem and I cannot find any solution in the web or documentation, even if I think that it is very trivial.
What do I want to do?
I have a datafram
You can use set_index and sum:
set_index
sum
df.set_index('CLASS').isna().sum(level=0)
Output:
FEATURE1 FEATURE2 FEATURE3 CLASS X 1.0 1.0 2.0 B 0.0 0.0 0.0