pandas 0.7.1 documentation

pandas.DataFrame.fillna

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

Fill NA/NaN values using the specified method

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)

inplace : boolean, default False

If True, fill the DataFrame in place. Note: this will modify any other views on this DataFrame, like if you took a no-copy slice of an existing DataFrame, for example a column in a DataFrame. Returns a reference to the filled object, which is self if inplace=True

Returns :

filled : DataFrame

See also

reindex, asfreq