Series.nunique

Series.nunique() Series[source]

Return the number of unique values in a Series

Returns

int

Number of unique values

See Also

:pandas_api_docs:`pandas.Series.nunique`

Examples

>>> from tests import OPENSEARCH_TEST_CLIENT
>>> s = oml.DataFrame(OPENSEARCH_TEST_CLIENT, 'flights')['Carrier']
>>> s.nunique()
4