Write ZigZag Indicator in Python

Job ID: 36153065

Budget: €8 – €30 EUR

Hello,
I want convert ZigZag indicator in Pinescript to python. I attached ZigZag indicator in pinescript. It must read a dataframe of the OHLC candles and return a list with labeled extremum, Higher High, Lower Low, Lower High, Higher Low.
Regards,
Related categories: Python Pine Script