find_interval_at#

ethograph.labels.intervals.find_interval_at(df, time_s, individual, label_ids=None)[source]#

Return DataFrame index of state interval containing time_s for individual.

Point events are never returned here — use find_point_at() for those.

Parameters:
  • label_ids (set[int] | None) – When given, only match intervals whose labels value is in this set. Useful for restricting to the active branch.

  • time. (Returns None if no non-background interval contains the)

Return type:

int | None