I have a dataframe that tracks when daytime rules or nighttime rules are in effect (independent of the actual the of day). I need to track when the dataframe switches from d