seismometer.data.cohorts.label_cohorts_numeric

seismometer.data.cohorts.label_cohorts_numeric(series, splits=None)

Bin a continuous numeric series of data, based on thresholds of inner bin edges.

Parameters:
  • series (SeriesOrArray) – pandas series of data to bin.

  • splits (Optional[List], optional) – List of splits to define inner bins (default: None-> series.mean()).

  • Returns

  • --------

  • pd.Series – Categorical series with labels.

Return type:

Series