Hi, I’m trying to convert some pandas code into Dask.
In pandas, I can easily ffill
my SeriesGroupBy object,
toy example:
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 get a “AttributeError: SeriesGroupBy object has not attribute ffill”
What would be the best way to achieve the above in Dask.
Thanks