Alternative of pd.NamedAgg to a code compliant with pandas 0.24.2?
Alternative of pd.NamedAgg to a code compliant with pandas 0.24.2? Question: When I’m trying to run my code, I’m facing the error: AttributeError: module ‘pandas’ has no attribute ‘NamedAgg’ . Can someone help me with the alternative of this?. Thanks My code: import pandas as pd import re df = pd.read_excel(‘testingfile.xlsx’) df_grouped = df.groupby([‘result_by’, ‘variable’]).agg(count_col=pd.NamedAgg(column=’variable’, …