Skip to content

apply function to Series, NotImplementedError #580

@wiso

Description

@wiso

Hello, here my problem to apply function to Series:

while this works:

import dask
d = np.arange(10)
dd = dask.array.from_array(d, 10)
np.cos(dd)

with dask.DataFrame it doesn't:

import pandas as pd
d = pd.DataFrame({'x': np.arange(10, dtype=float)})
dd = dask.dataframe.from_pandas(d, 2)
np.cos(d['x'])      # this works
np.cos(dd['x'])    # this doesn't work

actually I am not able to apply any functions. I get:

NotImplementedError                       Traceback (most recent call last)
<ipython-input-140-69836e5dabc3> in <module>()
----> 1 np.cos(dd['x'])

/usr/lib/python2.7/site-packages/dask/dataframe/core.pyc in __getitem__(self, key)
    372             return Series(merge(self.dask, key.dask, dsk), name,
    373                           self.name, self.divisions)
--> 374         raise NotImplementedError()
    375 
    376     def __abs__(self):

NotImplementedError: 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions