Count number of distinct elements in specified axis.
Return Series with number of distinct elements. Can ignore NaN values.
The axis to use. 0 or âindexâ for row-wise, 1 or âcolumnsâ for column-wise.
Donât include NaN in the counts.
Examples
>>> df = pd.DataFrame({'A': [4, 5, 6], 'B': [4, 1, 1]}) >>> df.nunique() A 3 B 2 dtype: int64
>>> df.nunique(axis=1) 0 1 1 2 2 2 dtype: int64
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4