break_on_integer¶
-
passengersim.summaries.tools.break_on_integer(s: Series, breakpoints: tuple[int, ...], minimum=
0, maximum=100, result_name=None)[source]¶ Break a series into categories based on integer breakpoints.
- Parameters:
- s : pd.Series¶
The series to break into categories.
- breakpoints : tuple of int¶
The breakpoints for the categories. If the first breakpoint is less than the minimum value it is moved up, and if the last breakpoint is greater than the maximum value it is moved down.
- minimum : int, default 0¶
The minimum value for the series. Values less than this will be assigned to the first category.
- maximum : int, default 100¶
The maximum value for the series. Values greater than this will be assigned to the last category.
- result_name : str, default None¶
The name to assign to the resulting series.
- Returns:
pd.Series – A series with categorical values.