dgerlanc/programming-with-data

Fix deprecated aggregation by column name in 03-group-pivot-slides

dgerlanc opened this issue · 0 comments

grp['smi'].agg({
    'avg': lambda x: x.mean(),
    'median': lambda x: x.median(),
    'q75': lambda x: x.dropna().quantile(0.75)
})

/Users/daniel/anaconda3/envs/pydata/lib/python3.7/site-packages/ipykernel_launcher.py:4: FutureWarning: using a dict on a Series for aggregation
is deprecated and will be removed in a future version
  after removing the cwd from sys.path.