last_year holds last year's monthly revenue. Draw this year's revenue and last_year by month, labelled This year and Last year, with a legend, the title Revenue: this year vs last year and the y-axis label Revenue.
import pandas as pd
monthly = pd.DataFrame({
"month": ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
"revenue": [420, 380, 510, 560, 600, 580, 640, 700, 660, 820, 950, 1100],
"orders": [210, 190, 240, 260, 275, 270, 290, 310, 300, 360, 410, 470],
"ad_spend": [60, 55, 70, 75, 80, 78, 85, 90, 88, 110, 130, 150],
"returns": [12, 10, 15, 14, 18, 16, 17, 20, 19, 25, 30, 34],
})
import matplotlib.pyplot as plt
last_year = [350, 340, 400, 450, 480, 470, 500, 560, 530, 650, 720, 860]Draw the chart. It is checked on what it shows: the data, the title and axis labels, the legend and the category names. Size and fonts don't matter.
Each hint gives a little more help. Try on your own first.
Run your code to see the output here.