Closed
Description
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
(optional) I have confirmed this bug exists on the master branch of pandas.
Problem description
While looking at the code, I found this line which I think is a bug. In the current master branch, pandas/core/groupby/groupby.py file, in the _get_cythonized_result() function :
if post_processing:
if not callable(pre_processing):
raise ValueError("'post_processing' must be a callable!")
While checking if post_processing is callable or not, we are actually passing pre_processing object instead of post_processing. This looks like a bug.
Expected Code
if post_processing:
if not callable(post_processing):
raise ValueError("'post_processing' must be a callable!")