Python Forum

Full Version: Describe repeating sequences in Dataframe and plot results
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all,

I have a Dataframe with a time series data. If I plot the data it would look something like in [attachment=1439]. Now I want to determine the time that the data is low (interval 1) and the time the data is high (interval 2). I want to plot the results in a graph like in [attachment=1440], so one can see if the repeating cycle is consistent or not.
I'm familiar with the basics of python, but I'm struggling where to start with this analysis. I think I can use something like a treshold to determine if the data is high or low, but how do I calculate the intervals and how can I keep the interval 1 and 2 together for a single cycle?.
Anyone have an idea for a starting point?