How to calculate Index PE

Read Krishnarajs post -

Nse website has standalone p/e. You want to calculate consolidated p/e. Every nifty stock has a weight in the index(which is calculated periodically) and nifty p/e is calculated accordingly.