Table Of Contents

Search

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

pandas.DataFrame.asof

DataFrame.asof(where, subset=None)[source]

The last row without any NaN is taken (or the last row without NaN considering only the subset of columns in the case of a DataFrame)

New in version 0.19.0: For DataFrame

If there is no good value, NaN is returned.

Parameters:

where : date or array of dates

subset : string or list of strings, default None

if not None use these columns for NaN propagation

Returns:

where is scalar

  • value or NaN if input is Series
  • Series if input is DataFrame

where is Index: same shape object as input

See also

merge_asof

Notes

Dates are assumed to be sorted Raises if this is not the case

Scroll To Top