DataFrameGroupBy.fillna(value=None, method=None, limit=None, axis=None)

Fill NA/NaN values using the specified method.

valuescalar, default None

Value to use to fill holes (e.g. 0).

method{‘bfill’, ‘ffill’, None}, default None

Method to use for filling holes in reindexed Series. ffill: propagate last valid observation forward to next valid. bfill: use next valid observation to fill gap.

axis{0 or ‘index’, 1 or ‘columns’}

Axis along which to fill missing values.

limitint, default None

If method is specified, this is the maximum number of consecutive NaN values to forward/backward fill. In other words, if there is a gap with more than this number of consecutive NaNs, it will only be partially filled. If method is not specified, this is the maximum number of entries along the entire axis where NaNs will be filled. Must be greater than 0 if not None.

Series or DataFrame

Object with missing values filled