Remove redundant .fillna(0)
at the end of groupby.size()/.count()
#6126
Labels
P1
Important tasks that we should complete soon
Performance 🚀
Performance related issues and pull requests.
Currently, each
groupby.size()
call is finished with.fillna(0)
:modin/modin/pandas/groupby.py
Line 899 in 632d724
The behavior was originally introduced in #1802 in order to match pandas in the sense of not having NaN values in the result of
.size()/.count()
. The NaNs appeared at the reduction phase of groupby due to some specific pandas behavior:Running the same code on the latest pandas gives the expected behavior (not producing NaNs), meaning that we now can remove the finalizing
.fillna(0)
in our modin's codeThe text was updated successfully, but these errors were encountered: