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.bfill  #

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

    

Backward 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.bfill  `

    

Backward fill the missing values in the dataset.

` DataFrame.bfill  `

    

Backward fill the missing values in the dataset.

` Series.fillna  `

    

Fill NaN values of a Series.

` DataFrame.fillna  `

    

Fill NaN values of a DataFrame.

Examples

With Series:

    
    
    >>> index = ['Falcon', 'Falcon', 'Parrot', 'Parrot', 'Parrot']
    >>> s = pd.Series([None, 1, None, None, 3], index=index)
    >>> s
    Falcon    NaN
    Falcon    1.0
    Parrot    NaN
    Parrot    NaN
    Parrot    3.0
    dtype: float64
    >>> s.groupby(level=0).bfill()
    Falcon    1.0
    Falcon    1.0
    Parrot    3.0
    Parrot    3.0
    Parrot    3.0
    dtype: float64
    >>> s.groupby(level=0).bfill(limit=1)
    Falcon    1.0
    Falcon    1.0
    Parrot    NaN
    Parrot    3.0
    Parrot    3.0
    dtype: float64
    

With DataFrame:

    
    
    >>> df = pd.DataFrame({'A': [1, None, None, None, 4],
    ...                    'B': [None, None, 5, None, 7]}, index=index)
    >>> df
              A         B
    Falcon  1.0       NaN
    Falcon  NaN       NaN
    Parrot  NaN       5.0
    Parrot  NaN       NaN
    Parrot  4.0       7.0
    >>> df.groupby(level=0).bfill()
              A         B
    Falcon  1.0       NaN
    Falcon  NaN       NaN
    Parrot  4.0       5.0
    Parrot  4.0       7.0
    Parrot  4.0       7.0
    >>> df.groupby(level=0).bfill(limit=1)
              A         B
    Falcon  1.0       NaN
    Falcon  NaN       NaN
    Parrot  NaN       5.0
    Parrot  4.0       7.0
    Parrot  4.0       7.0