pvanalytics.quality.gaps.start_stop_dates

pvanalytics.quality.gaps.start_stop_dates(series, days=10)

Get the start and end of data excluding leading and trailing gaps.

Parameters
  • series (Series) – A DatetimeIndexed series of booleans.

  • days (int, default 10) – The minimum number of consecutive days where every value in series is True for data to start or stop.

Returns

  • start (Datetime or None) – The first valid day. If there are no sufficiently long periods of valid days then None is returned.

  • stop (Datetime or None) – The last valid day. None if start is None.