Github user rxin commented on the issue: https://github.com/apache/spark/pull/15135 Pandas doesn't support this, does it? ``` >>> pd.read_csv('test.csv').groupby('a').agg('sum', 'avg') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Python/2.7/site-packages/pandas/core/groupby.py", line 3597, in aggregate return super(DataFrameGroupBy, self).aggregate(arg, *args, **kwargs) File "/Library/Python/2.7/site-packages/pandas/core/groupby.py", line 3114, in aggregate result, how = self._aggregate(arg, _level=_level, *args, **kwargs) File "/Library/Python/2.7/site-packages/pandas/core/base.py", line 428, in _aggregate return getattr(self, arg)(*args, **kwargs), None TypeError: f() takes exactly 1 argument (2 given) >>> pd.read_csv('test.csv').groupby('a').agg(['sum', 'avg']) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Library/Python/2.7/site-packages/pandas/core/groupby.py", line 3597, in aggregate return super(DataFrameGroupBy, self).aggregate(arg, *args, **kwargs) File "/Library/Python/2.7/site-packages/pandas/core/groupby.py", line 3114, in aggregate result, how = self._aggregate(arg, _level=_level, *args, **kwargs) File "/Library/Python/2.7/site-packages/pandas/core/base.py", line 564, in _aggregate return self._aggregate_multiple_funcs(arg, _level=_level), None File "/Library/Python/2.7/site-packages/pandas/core/base.py", line 609, in _aggregate_multiple_funcs results.append(colg.aggregate(arg)) File "/Library/Python/2.7/site-packages/pandas/core/groupby.py", line 2574, in aggregate (_level or 0) + 1) File "/Library/Python/2.7/site-packages/pandas/core/groupby.py", line 2636, in _aggregate_multiple_funcs results[name] = obj.aggregate(func) File "/Library/Python/2.7/site-packages/pandas/core/groupby.py", line 2570, in aggregate return getattr(self, func_or_funcs)(*args, **kwargs) File "/Library/Python/2.7/site-packages/pandas/core/groupby.py", line 498, in __getattr__ (type(self).__name__, attr)) AttributeError: 'SeriesGroupBy' object has no attribute 'avg' ```
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org