Premium problem76. Count Unique Values, Counting NaN

Easy Locked

Return the number of unique values in s, treating NaN as its own distinct value (so a Series with two NaN entries counts them as one extra unique value, not zero).

Input

0    1.0
1    2.0
2    2.0
3    NaN
4    3.0
5    NaN
6    4.0
dtype: float64

Output

5

Premium problem

This one's part of Premium. Unlock the full Pandas track plus every other premium problem on the site.

Implement solve(...)