How to calculate Max Pain using python

Next in option chain series, we now fetch the option chain and calculate the max-pain

Fetching live option chain from NSE in pandas dataframe

Use python requests and beautiful soup to extract option chain from NSE