pandas 0.8.1 documentation

pandas.Series.fillna

Series.fillna(value=None, method='pad', inplace=False, limit=None)

Fill NA/NaN values using the specified method

Parameters :

value : any kind (should be same type as array)

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

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

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

inplace : boolean, default False

If True, fill the Series in place. Note: this will modify any other views on this Series, for example a column in a DataFrame. Returns a reference to the filled object, which is self if inplace=True

limit : int, default None

Maximum size gap to forward or backward fill

Returns :

filled : Series

See also

reindex, asfreq