Skip to content

Commit

Permalink
Python3 dask aggregate fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr committed Nov 8, 2016
1 parent dbae3e6 commit 9c80879
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions holoviews/core/data/dask.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,14 @@ def aggregate(cls, columns, dimensions, function, **kwargs):
'std': 'std', 'sum': 'sum', 'var': 'var'}
if len(dimensions):
groups = reindexed.groupby(cols, sort=False)
if (hasattr(function, 'func_name') and function.func_name in inbuilts):
agg = getattr(groups, inbuilts[function.func_name])()
if (function.__name__ in inbuilts):
agg = getattr(groups, inbuilts[function.__name__])()
else:
agg = groups.apply(function, axis=1)
agg = groups.apply(function)
return agg.reset_index()
else:
if (hasattr(function, 'func_name') and function.func_name in inbuilts):
agg = getattr(reindexed, inbuilts[function.func_name])()
if (function.__name__ in inbuilts):
agg = getattr(reindexed, inbuilts[function.__name__])()
else:
raise NotImplementedError
return pd.DataFrame(agg.compute()).T
Expand Down

0 comments on commit 9c80879

Please sign in to comment.