I would like to track consecutive highs as shown in this picture in a timeseries with pandas. See the image below:
How can this be done with Pandas?
In case you would like to play with a real life example you can download the prices of a stock, say 'MSFT' and use the "close" for your example . There are multiple ways to download the stock price but here is one:
import yahooquery
ticker = Ticker('MSFT', asynchronous=True)
df = ticker.history()