Pandas, Data Science, Python, Data Analysis, Programming.
df_pd.date.dt.month])['sales'].agg('mean') # Polars groupby mean df_pl.groupby([pl.col('office'), pl.col('date').dt.month()]).agg([pl.mean('sales')]) The results show that, in group-by and aggregation calculations, Polars performs better than Pandas. The syntax of Polars is quite similar to Pandas.