Skip to content

Missing Built-in methods for SeriesGroupBy ffill #8708

Closed

Description

@CJC-ds

Some of the "built-in" methods for dask SeriesGroupBy objects are missing.

In pandas we could do something like...

import numpy as np
import pandas as pd

df = pd.DataFrame({
    'a_cat': list('aabbbaccc'),
    'b_num': [np.nan if i%3!=0 else (i+1) for i in range(9)]
})

df.groupby('a_cat')['b_num'].ffill()

But when I try to do it in Dask..

import dask.dataframe as dd

ddf = dd.from_pandas(df)
ddf.groupby('a_cat')['b_num'].ffill()

I receive an AttributeError: 'SeriesGroupBy' object has no attribute 'ffill'


I'm hoping this can be implemented along with the other fillna methods. Thanks.

Activity

  1. jsignell commented on Feb 16, 2022

    @jsignell
    Member

    Thanks for opening this issue @CJC-ds if you would like to work on it please feel free to open a pull request!

  2. added
    feature
    good second issue
    on Feb 16, 2022
  3. pavithraes commented on Mar 8, 2022

    @pavithraes
    Member

    I'd like to take a pass at this, I'll open a PR soon :)

  4. self-assigned this
    on Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

dataframefeaturegood second issue

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions