rapidsai / dask-cudf

[ARCHIVED] Dask support for distributed GDF object --> Moved to cudf
https://github.com/rapidsai/cudf
Apache License 2.0
136 stars 58 forks source link

[BUG] DataFrame.sum and mean fail due to lack of axis and skipna keywords in cudf.DataFrame.sum #261

Closed beckernick closed 5 years ago

beckernick commented 5 years ago

DataFrame level sum and mean fail due to lack of axis and skipna keyword arguments in cudf.DataFrame.sum. Raising this issue here for tracking purposes and will raise the upstream cuDF issue to resolve the issue.

import cudf
import dask_cudf

df = cudf.DataFrame({'a':range(10), 'b':range(10, 20)})
print(df.mean())
ddf = dask_cudf.from_cudf(df, 2)
ddf.sum()
ddf.mean() # fails also for the same reason
a     4.5
b    14.5
dtype: float64
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-1-ccf591ee1075> in <module>
      5 print(df.mean())
      6 ddf = dask_cudf.from_cudf(df, 2)
----> 7 ddf.sum()
      8 ddf.mean()

/conda/envs/rapids/lib/python3.7/site-packages/dask/dataframe/core.py in sum(self, axis, skipna, split_every, dtype, out, min_count)
   1333             out=None, min_count=None):
   1334         result = self._reduction_agg('sum', axis=axis, skipna=skipna,
-> 1335                                      split_every=split_every, out=out)
   1336         if min_count:
   1337             return result.where(self.notnull().sum(axis=axis) >= min_count,

/conda/envs/rapids/lib/python3.7/site-packages/dask/dataframe/core.py in _reduction_agg(self, name, axis, skipna, split_every, out)
   1297         axis = self._validate_axis(axis)
   1298 
-> 1299         meta = getattr(self._meta_nonempty, name)(axis=axis, skipna=skipna)
   1300         token = self._token_prefix + name
   1301 

TypeError: sum() got an unexpected keyword argument 'axis'
beckernick commented 5 years ago

Resolved by #1849. Closing.