Table Of Contents

Search

Enter search terms or a module, class or function name.

pandas.api.extensions.ExtensionArray.fillna

ExtensionArray.fillna(value=None, method=None, limit=None)[source]

Fill NA/NaN values using the specified method.

Parameters:
value : scalar, array-like

If a scalar value is passed it is used to fill all missing values. Alternatively, an array-like ‘value’ can be given. It’s expected that the array-like have the same length as ‘self’.

method : {‘backfill’, ‘bfill’, ‘pad’, ‘ffill’, None}, default None

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

limit : int, 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.

Returns:
filled : ExtensionArray with NA/NaN filled
Scroll To Top