Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

import pandas as pd import matplotlib.pyplot as plt import seaborn as sns # Data df = pd . read _ csv ( ' transactions -

import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# Data
df = pd.read_csv('transactions-pet_store.csv')
df_orig = df.copy()
Question 2
Find any clearly "incorrect" values in the Price column and "clean" the DataFrame to address those values.
Ensure you make the changes to the DataFrame assigned to the variable df.
Question 3
After you've done the cleaning above, remove any column that has more than 500 missing values.
Ensure you make the changes to the DataFrame assigned to the variable df.'
Question 4
Address the other missing values. You can replace the values or remvove them, but whatever method you decide to clean the DataFrame, you should no longer have any missing values.
Ensure you make the changes to the DataFrame assigned to the variable df.
Question 6
Determine most common category (Product_Category) purchases (number of total items) for both Product_Line categories. Assign the (string) name of these categories to their respective variables common_category_cat & common_category_dog.
Question 7
Determine which categories (Product_Category), by Product_Line have the median highest Price. Assign the (string) name of these categories to their respective variables priciest_category_cat & priciest_category_dog.
Question 8
You want to emphasize to your stakeholders that the total number of product categories sold differ between the two Product_Line categories ('cat' & 'dog').
Create a horizontal bar plot that has Product_Category on the y-axis and the total number of that category sold (using the Quantity) by each Product_Line category. Also change the axis labels to something meaningful and add a title.
You will likely want to use Seaborn. Make sure you set the result to the variable ax like the following:
ax = # code to create a bar plot
Question 9
Based on the plot from Question 8, what would you conclude for your stakeholders about what products they should sell? What would be the considerations and/or caveats you'd communicate to your stakeholders?
Write at least a couple sentences of your thoughts in a string assigned to the variable answer_to_9.
The cell below should look something like this:
answer_to_9='''
I think that based on the visualization that ****.
Therefore I would communicate with the stakeholders that ****
'''
Question 10
The plot you created for Question 8 is good but could be modified to emphasize which products are important for the business.
Create an explanatory visualization that emphasizes the insight you about the product category. This would be a visualization you'd share with the business stakeholders.
Make sure you set the result to the variable ax like the following:
ax = # code to create explanatory visualization

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions

Question

languages are close to the level of humans in terms of readability

Answered: 1 week ago