Closed
Description
I think the expected value of (a, b)
in the function below is (5, 6)
.
def foo(x, a=1, b=2):
print(a, b)
return x
df = pd.DataFrame({'x': [1, 2, 3]})
# 0 is for the axis argument; 5 is the first (and only) in args
print(df.agg([foo], 0, 5, b=6))
# 1 2
# 1 2
# 1 2
This issue may also persist with apply and transform, in DataFrame, Series, DataFrameGroupBy, SeriesGroupBy, Rolling, and Resampler, and with other types of arguments (single and/or dict-likes). This should be fully investigated to determine where args / kwargs are ignored.