groupby.SeriesGroupBy.rolling ](pandas.core.groupby.SeriesGroupBy.rolling.html)
    * [ pandas.core.groupby.SeriesGroupBy.sample ](pandas.core.groupby.SeriesGroupBy.sample.html)
    * [ pandas.core.groupby.SeriesGroupBy.sem ](pandas.core.groupby.SeriesGroupBy.sem.html)
    * [ pandas.core.groupby.SeriesGroupBy.shift ](pandas.core.groupby.SeriesGroupBy.shift.html)
    * [ pandas.core.groupby.SeriesGroupBy.size ](pandas.core.groupby.SeriesGroupBy.size.html)
    * [ pandas.core.groupby.SeriesGroupBy.skew ](pandas.core.groupby.SeriesGroupBy.skew.html)
    * [ pandas.core.groupby.SeriesGroupBy.std ](pandas.core.groupby.SeriesGroupBy.std.html)
    * [ pandas.core.groupby.SeriesGroupBy.sum ](pandas.core.groupby.SeriesGroupBy.sum.html)
    * [ pandas.core.groupby.SeriesGroupBy.var ](pandas.core.groupby.SeriesGroupBy.var.html)
    * [ pandas.core.groupby.SeriesGroupBy.tail ](pandas.core.groupby.SeriesGroupBy.tail.html)
    * [ pandas.core.groupby.SeriesGroupBy.take ](pandas.core.groupby.SeriesGroupBy.take.html)
    * [ pandas.core.groupby.SeriesGroupBy.value_counts ](pandas.core.groupby.SeriesGroupBy.value_counts.html)
    * [ pandas.core.groupby.DataFrameGroupBy.boxplot ](pandas.core.groupby.DataFrameGroupBy.boxplot.html)
    * [ pandas.core.groupby.DataFrameGroupBy.hist ](pandas.core.groupby.DataFrameGroupBy.hist.html)
    * [ pandas.core.groupby.SeriesGroupBy.hist ](pandas.core.groupby.SeriesGroupBy.hist.html)
    * [ pandas.core.groupby.DataFrameGroupBy.plot ](pandas.core.groupby.DataFrameGroupBy.plot.html)
    * [ pandas.core.groupby.SeriesGroupBy.plot ](pandas.core.groupby.SeriesGroupBy.plot.html)
  * [ Resampling ](../resampling.html)
  * [ Style ](../style.html)
  * [ Plotting ](../plotting.html)
  * [ Options and settings ](../options.html)
  * [ Extensions ](../extensions.html)
  * [ Testing ](../testing.html)
  * [ Missing values ](../missing_value.html)

  * [ __ ](../../index.html)
  * [ API reference ](../index.html)
  * [ GroupBy ](../groupby.html)
  * pandas.core.... 

#  pandas.core.groupby.SeriesGroupBy.ffill  #

SeriesGroupBy.  ffill  (  _ limit  =  None  _ )  [ [source]
](https://github.com/pandas-
dev/pandas/blob/v2.2.2/pandas/core/groupby/groupby.py#L4012-L4103) #

    

Forward fill the values.

Parameters  :

    

**limit** int, optional

    

Limit of how many values to fill.

Returns  :

    

Series or DataFrame

    

Object with missing values filled.

See also

` Series.ffill  `

    

Returns Series with minimum number of char in object.

` DataFrame.ffill  `

    

Object with missing values filled or None if inplace=True.

` Series.fillna  `

    

Fill NaN values of a Series.

` DataFrame.fillna  `

    

Fill NaN values of a DataFrame.

Examples

For SeriesGroupBy:

    
    
    >>> key = [0, 0, 1, 1]
    >>> ser = pd.Series([np.nan, 2, 3, np.nan], index=key)
    >>> ser
    0    NaN
    0    2.0
    1    3.0
    1    NaN
    dtype: float64
    >>> ser.groupby(level=0).ffill()
    0    NaN
    0    2.0
    1    3.0
    1    3.0
    dtype: float64
    

For DataFrameGroupBy:

    
    
    >>> df = pd.DataFrame(
    ...     {
    ...         "key": [0, 0, 1, 1, 1],
    ...         "A": [np.nan, 2, np.nan, 3, np.nan],
    ...         "B": [2, 3, np.nan, np.nan, np.nan],
    ...         "C": [np.nan, np.nan, 2, np.nan, np.nan],
    ...     }
    ... )
    >>> df
       key    A    B   C
    0    0  NaN  2.0 NaN
    1    0  2.0  3.0 NaN
    2    1  NaN  NaN 2.0
    3    1  3.0  NaN NaN
    4    1  NaN  NaN NaN
    

Propagate non-null values forward or backward within each group along columns.

    
    
    >>> df.groupby("key").ffill()
         A    B   C
    0  NaN  2.0 NaN
    1  2.0  3.0 NaN
    2  NaN  NaN 2.0
    3  3.0  NaN 2.0
    4  3.0  NaN 2.0
    

Propagate non-null values forward or backward within each group along rows.

    
    
    >>> df.T.groupby(np.array([0, 0, 1, 1])).ffill().T
       key    A    B    C
    0  0.0  0.0  2.0  2.0
    1  0.0  2.0  3.0  3.0
    2  1.0  1.0  NaN  2.0