PERF: DataFrame.groupby.nunique is non-performant #15197
Labels
Groupby
Performance
Memory or execution speed performance
Reshaping
Concat, Merge/Join, Stack/Unstack, Explode
Milestone
xref #14376
Series.groupby.nunique
has a very performant implementation, but the way theDataFrame.groupby.nunique
is implemented (via.apply
) it ends up in a python loop over the groups, which nullifies this.should be straightforward to fix this. need to make sure to test with
as_index=True/False
The text was updated successfully, but these errors were encountered: