Python
#44

Calculate Month-over-Month Growth with pct_change() in Pandas

EasyPwC
Interview Question #44
Asked at PwC

Given monthly revenue records, calculate Month-over-Month (MoM) revenue percentage change `mom_growth_pct` rounded to 2 decimal places.

Input Table: monthly_rev
3 rows preview
monthrevenue
2026-01100000
2026-02125000
2026-03118750
Expected Output Structure3 rows
monthrevenuemom_growth_pct
2026-01100000NULL
2026-0212500025
2026-03118750-5
Interview Context

Asked frequently in data analyst and business analyst technical rounds. Focus on clean filtering, optimal indexing usage, and unambiguous column selection.

Python 3.10 (Pandas)
Environment Ready

Click "Run & Test" to execute your Pandas code against the test assertions.

Chat with us