Bite 183. Analyze sales data with pandas

For this Bite we got some fake Excel sales data which we are going to analyze with pandas.

First complete load_excel_into_dataframe to do just that. As stated in the docstring the data is in the SalesOrders sheet. This function forms the basis for the next 3 functions you need to complete.

Next complete get_year_region_breakdown to get a grouping of sales by Year (a new column you probably want to add) and Region. Return the newly obtained DataFrame which should look like this:

Year  Region
2018  Central    3833.51
      East       5193.71
      West        231.12
2019  Central    7305.56
      East        808.38
      West       2255.60
Name: Total, dtype: float64

Lastly code up get_best_sales_rep and get_most_sold_item to learn which sales rep performed best and what item had most (unit) sales. See the docstrings for the required return tuples. They are pretty similar so solving the fist one should make it pretty easy to solve the second one.

We hope this is a realistic and fun data analysis exercise. Keep calm and code more Python + pandas!

9 out of 10 users completed this Bite.
Will you be Pythonista #10 to crack this Bite?
It takes an average of ~102 minutes to solve this Bite (submissions 5-240 min).
Pythonistas rate this Bite 5.0 on a 1-10 difficulty scale.
» Up for a challenge? 💪

Login and get coding
We use Python 3.7