pandas 0.7.0 documentation

pandas.DataFrame.fillna

DataFrame.fillna(value=None, method='pad')

Fill NA/NaN values using the specified method. Member Series / TimeSeries are filled separately

Parameters :

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

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

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

Returns :

filled : DataFrame

See also

reindex, asfreq