SpinTheMic
Pro

Interview practice question

Month-over-month growth for each product

Data Analyst · Python and Pandas · Intermediate

How do you compute month-over-month revenue growth for each product in pandas?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Aggregate revenue by product and month.
  • Sort by product, month.
  • groupby("product")["revenue"].pct_change().
  • Ensure no missing months.
  • Handle zero/negative bases.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics