Open
Description
Is your feature request related to a problem?
From #9544 (comment)
Though perhaps we should add nunique along a dimension implemented as sort along axis, succeeding-elements-are-not-equal along axis handling NaNs, then sum along axis.
xref pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.nunique.html
I think I'd add it to https://github.com/pydata/xarray/blob/main/xarray/util/generate_aggregations.py