Open jasper1918 opened 7 years ago
http://pandas-docs.github.io/pandas-docs-travis/whatsnew
In [23]: (df.groupby('A') .agg({'B': {'foo': 'sum'}, 'C': {'bar': 'min'}}) ) FutureWarning: using a dict with renaming is deprecated and will be removed in a future version
Out[23]: B C foo bar A 1 3 0 2 7 3 You can accomplish nearly the same by:
In [142]: (df.groupby('A')
.....: .agg({'B': 'sum', 'C': 'min'})
.....: .rename(columns={'B': 'foo', 'C': 'bar'})
.....: )
.....:
Out[142]:
bar foo
A
1 0 3
2 3 7
/pandas/core/groupby.py:3961: FutureWarning: using a dict with renaming is deprecated and will be removed in a future version return super(DataFrameGroupBy, self).aggregate(arg, *args, **kwargs)