Closed
Description
related #28201
I find out the result gotten from pandas master is different from using a specific version recently
Also, minimum reproducible example:
df = pd.DataFrame({"group": ['a', 'a', 'b', 'b'], "A": [0, 1, 2, 3], "B": [5, 6, 7, 8]})
df.columns = pd.MultiIndex.from_tuples([('x', 'group'), ('y', 'A'), ('y', 'B')])
if running the code below on pandas master:
df.groupby(('x', 'group')).agg(a_max=(('y', 'A'), "max"))
But if running the same code in pandas==0.25.3
, then will get the error:
ValueError: operands could not be broadcast together with shapes (1,2) (3,) (1,2)
I didn't find any PRs since 0.25.3 was released related to this issue, so curious why this was caused.