The coffee shop’s management wants to find out which of the outlets has the highest revenue. Calculate the total revenue for each of the outlets.

Question 1.
Import the csv file in pandas and save it as a dataframe. Then, write a code that returns: (1) the first 10 and last 10 rows; and (2) the number of rows and columns in the data set. Discuss what the code shows you about the
data set.

Question 2.

Write a code that returns: (1) the distribution of sales outlets (including a count of each outlet type and a bar chart); (2) the minimum and maximum transaction_id; (3) the minimum, maximum and average customer_id;
and (4) the distribution of products in bought in store (yes or no) using a pie chart.

Question 3.

You discover that the variable unit_price was incorrectly recorded. Create a new variable unit_price_corrected
where you add 1.50 to unit_price for the first 100 items, and you subtract 1.50 from the unit price for the
remaining items in the data set. Then, calculate and compare the average of unit_price and
unit_price_corrected.

Question 4.

The coffee shop’s management wants to find out which of the outlets has the highest revenue. Calculate the
total revenue for each of the outlets. Remember that total revenue will be unit_price_corrected multiplied by
quantity. Also, present your calculations using a line graph. Explain what you found and what the chart shows.

Question 5.

The coffee shop’s management wants to find out how the staff are doing in terms of sales. For each of the staff
ids, calculate the total product units sold and the total revenue sold. Provide two bar charts (one for total
product units, one for total revenue) by staff id, and interpret your findings.

Question 6.

Develop one question yourself that can be answered with the information included in this dataset. Write the
code to answer the question, and include a visualization.

Question 7.

Develop one question yourself that can be answered with the information included in this dataset. Write the
code to answer the question, and include a visualization.

Part 2

You are hired to develop an online management system for a cafe. This program will be used by the café admins and will help them manage online orders. Use a function to develop a program with the following features:

1.
Allow the café admin to enter the menu items until the user enters quit to stop. The list should include
a minimum of 10 items. For example: main_categories = [Americano, Espresso, Cheese sandwich]

2.
Use the main menu list you created in step 1 to create a dictionary that should contain the price of
each of the menu items with their respective cost. For example: items_price= {“Americano”: 13,
“Espresso”: 9, “Cheese sandwich”:15}

3.
Use the main menu list you created in step 1 to create another dictionary that should contain the
quantity of each menu item. items_quantity={“Americano”: 50, “Esspresso”: 30, “Cheese sandwich”:10}

4.
Use the main menu list you created in step 1 to create another dictionary that allows the cafe admin to record the rating received from customers on menu items. The ratings are scored on a scale from 1 to
5, with 5 indicating the maximum customer satisfaction. For example: items_rating = {“Americano”: 4,
“Esspresso”: 1, “Cheese sandwich”:5}

Your function should return the following data structures separately:

1.
The dictionary that includes all entries.

2.
A list named satisfied_item, which includes the items with satisfaction of 3 or higher.

3.
A list named highprice_item, which includes the items with price above 10 .

4.
A list named few_items, which includes the items with quantity less than 5