-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
Duplicate ReportDuplicate issue or pull requestDuplicate issue or pull requestEnhancementReshapingConcat, Merge/Join, Stack/Unstack, ExplodeConcat, Merge/Join, Stack/Unstack, Explode
Description
Currently, pd.DataFrame does not have a .nunique
method
DataFrames
have various aggregation methods that they share with series
, examples being .sum
, .count
etc. Likewise with DataFrame.groupby
-objects.
In many cases, a .nunique
would be useful as on DataFrame
and DataFrame.groupby
-objects, for example when you're trying to assess the diversity of data in a DataFrame.
Expected Output
When you're using DataFrame.nunique
, with n
columns, you should get back a series
where the index values are the dataframe.columns values, and the series values are the count of unique values, for each column.
Metadata
Metadata
Assignees
Labels
Duplicate ReportDuplicate issue or pull requestDuplicate issue or pull requestEnhancementReshapingConcat, Merge/Join, Stack/Unstack, ExplodeConcat, Merge/Join, Stack/Unstack, Explode