Skip to content

dask dataframe alias isna to isnull. #3239

Closed

Description

@TomAugspurger

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.

Activity

  1. added
    good first issue
    on Mar 2, 2018
  2. cr458 commented on Mar 18, 2018

    @cr458
    Contributor

    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?

  3. TomAugspurger commented on Mar 18, 2018

    @TomAugspurger
    MemberAuthor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    dataframegood first issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions