pandas.api.typing.Rolling.nunique
pandas 3.1.1 · Window operations · method
Count distinct values. Set dropna=False to count missing values where supported.
Call syntax
pd.api.typing.Rolling.nunique(numeric_only=False)Run the example
Edit the example and select Run Python to see the result.
Parameters
| Parameter | Requirement | Accepted values and behavior |
|---|---|---|
numeric_only |
Optional Positional or keyword Default False |
bool Restrict the calculation to columns pandas considers numeric where applicable. |
Returns
Series or DataFrame