Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dask dataframe alias isna to isnull. #3239

Closed
TomAugspurger opened this issue Mar 2, 2018 · 2 comments
Closed

dask dataframe alias isna to isnull. #3239

TomAugspurger opened this issue Mar 2, 2018 · 2 comments
Labels
dataframe good first issue Clearly described and easy to accomplish. Good for beginners to the project.

Comments

@TomAugspurger
Copy link
Member

Pandas prefers isna now (not sure if isnull is being deprecated).

>>> pd.Series([1, 2, 3]).isna()

May be good to have a top-level dd.isna method as well.

@TomAugspurger TomAugspurger added good first issue Clearly described and easy to accomplish. Good for beginners to the project. dataframe labels Mar 2, 2018
@cr458
Copy link
Contributor

cr458 commented Mar 18, 2018

Could have a look at implementing this? I guess it would look something like:

def isna(values):
    import pandas as pd
    return elemwise(pd.isna, values, dtype='bool')

in routines.py?

@TomAugspurger
Copy link
Member Author

I think to_datetime will be a good guide for the top-level pd.isna

dask/dask/dataframe/core.py

Lines 4113 to 4116 in 4ad9622

@wraps(pd.to_datetime)
def to_datetime(arg, **kwargs):
meta = pd.Series([pd.Timestamp('2000')])
return map_partitions(pd.to_datetime, arg, meta=meta, **kwargs)

And isnull / notnull should be good guides for the methods on Series / DataFrame

dask/dask/dataframe/core.py

Lines 1499 to 1501 in 4ad9622

@derived_from(pd.DataFrame)
def isnull(self):
return self.map_partitions(M.isnull)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dataframe good first issue Clearly described and easy to accomplish. Good for beginners to the project.
Projects
None yet
Development

No branches or pull requests

3 participants