lair.pcaps.build_pcap_mask#

lair.pcaps.build_pcap_mask(index, events)[source]#

Build a boolean mask for PCAP events.

Parameters:
  • index (pd.Index) – The datetime-like index to build the mask for. Naive times are taken as UTC; tz-aware times are converted.

  • events (pd.DataFrame) – The DataFrame of PCAP events (naive UTC or tz-aware start/end).

Returns:

pd.Series – A boolean mask where True indicates a time within a PCAP event.

Return type:

Series