Question: Python: a . Calculate the total sales and profit for each state grouped by year. [ 1 0 mins ] i . Output format :

Python:
a. Calculate the total sales and profit for each state grouped by year. [10
mins]
i. Output format : [Year, State, $Sales, $Profit]
b. Calculate the moving average $Sales and $Profit every week considering
a window of 4 weeks in 2016 to 2017. Also calculate the relative
delta/difference between every week in $Profit. [20 mins]
i. Note: Relative delta - If the sales last week was 10K and current
week the sales is 8K then the relative delta is -20%.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!