bff.get_peaks

bff.get_peaks(s, distance_scale=0.04)

Get the peaks of a time series having datetime as index.

Only the peaks having a height higher than 0.75 quantile are returned and a distance between two peaks at least df.shape[0]*distance_scale.

Return the dates and the corresponding value of the peaks.

Parameters
  • s (pd.Series) – Series to get the peaks from, with datetime as index.

  • distance_scale (str, default 0.04) – Scaling for the minimal distances between two peaks. Multiplication of the length of the DataFrame with the distance_scale value.

Returns

  • dates (np.ndarray) – Dates when the peaks occur.

  • heights (np.ndarray) – Heights of the peaks at the corresponding dates.