Get startedGet started for free

Cumulative sales

In the last exercise, you established that December is a big month for department stores. Are there other months where sales increase or decrease significantly?

Your task now is to look at monthly cumulative sales for each industry. The slope of the cumulative sales line will explain a lot about how steady sales are over time: a straight line will indicate steady growth, and changes in slope will indicate relative increases or decreases in sales.

numpy is loaded for you as np, and the monthly_sales array is available. The monthly_sales columns in order refer to liquor store, restaurant, and department store sales.

This exercise is part of the course

Introduction to NumPy

View Course

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# Find cumulative monthly sales for each industry
cumulative_monthly_industry_sales = ____
print(cumulative_monthly_industry_sales)
Edit and Run Code