def nunique(self, dropna: bool=True) -> int:
    "\n        Return number of unique elements in the object.\n\n        Excludes NA values by default.\n\n        Parameters\n        ----------\n        dropna : bool, default True\n            Don't include NaN in the count.\n\n        Returns\n        -------\n        int\n\n        See Also\n        --------\n        DataFrame.nunique: Method nunique for DataFrame.\n        Series.count: Count non-NA/null observations in the Series.\n\n        Examples\n        --------\n        >>> s = pd.Series([1, 3, 5, 7, 7])\n        >>> s\n        0    1\n        1    3\n        2    5\n        3    7\n        4    7\n        dtype: int64\n\n        >>> s.nunique()\n        4\n        "
    uniqs = self.unique()
    if dropna:
        uniqs = remove_na_arraylike(uniqs)
    return len(uniqs)
Return number of unique elements in the object.

Excludes NA values by default.

Parameters
----------
dropna : bool, default True
    Don't include NaN in the count.

Returns
-------
int

See Also
--------
DataFrame.nunique: Method nunique for DataFrame.
Series.count: Count non-NA/null observations in the Series.

Examples
--------
>>> s = pd.Series([1, 3, 5, 7, 7])
>>> s
0    1
1    3
2    5
3    7
4    7
dtype: int64

>>> s.nunique()
4
def nunique(self, dropna: bool=True) -> int:
    "\n        Return number of unique elements in the object.\n\n        Excludes NA values by default.\n\n        Parameters\n        ----------\n        dropna : bool, default True\n            Don't include NaN in the count.\n\n        Returns\n        -------\n        int\n\n        See Also\n        --------\n        DataFrame.nunique: Method nunique for DataFrame.\n        Series.count: Count non-NA/null observations in the Series.\n\n        Examples\n        --------\n        >>> s = pd.Series([1, 3, 5, 7, 7])\n        >>> s\n        0    1\n        1    3\n        2    5\n        3    7\n        4    7\n        dtype: int64\n\n        >>> s.nunique()\n        4\n        "
    uniqs = self.unique()
    if dropna:
        uniqs = remove_na_arraylike(uniqs)
    return len(uniqs)