0% found this document useful (0 votes)
3 views1 page

3rd Part Customer Analysis

The document outlines a series of data visualizations using bar and pie charts to analyze various aspects of a dataset, including purchases by category, customer distribution by location, and average purchase amounts by season. It also examines subscription status, payment methods, shipping types, gender distribution, discounts applied, and the impact of promo codes on purchases. Each visualization is generated using the appropriate plotting functions and displays relevant titles and labels.

Uploaded by

nonamesopi3.14
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

3rd Part Customer Analysis

The document outlines a series of data visualizations using bar and pie charts to analyze various aspects of a dataset, including purchases by category, customer distribution by location, and average purchase amounts by season. It also examines subscription status, payment methods, shipping types, gender distribution, discounts applied, and the impact of promo codes on purchases. Each visualization is generated using the appropriate plotting functions and displays relevant titles and labels.

Uploaded by

nonamesopi3.14
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

print("---------------------------------------

VISUALIZATIONS--------------------------------------")
Category_count = data["Category"].value_counts()
print(Category_count.head())
Category_count.plot(kind = "bar", color = ['blue','pink','purple','red'], title =
"Purchases by Category in Bar", ylabel = "Items Purchased")
plt.show()
Category_count.plot(kind = "pie", title= "Purchases by Category in Pie")
plt.show()
Location_count = data["Location"].value_counts()
Location_count.plot(kind = "bar", rot = 90, figsize = (12,4),fontsize = "small",
title = "Customer Distribution by Location", ylabel = "Number of Customers")
plt.show()
avg_price.plot(kind = "bar",figsize = (12,4), ylabel = "Average Purchase Price",
title = "Distribution of Average Purchase by Location")
plt.show()
subscription_type = data["Subscription Status"].value_counts()
subscription_type.plot(kind = "pie", autopct = '%.1f%%', title= "subscription
status")
plt.show()
seasons = data['Season'].unique()
average_purchase_season = data.groupby('Season')['Purchase Amount (USD)'].mean()
average_purchase_season.plot(kind = "bar", title = "Impact of Season on Purchase
Amount", ylabel = "Average Purchase Amount", xlabel = "Season", color =
['blue','pink','red','purple'])
plt.show()
payment_method = data["Payment Method"].value_counts()
payment_method.plot(kind = "bar", color =
['blue','pink','red','yellow','orange','lightblue'], title = "Payment Method",
ylabel = "Number of Customers", xlabel = "Payment Method")
plt.show()
shipping = data["Shipping Type"].value_counts()
shipping.plot(kind = "barh", title = "Shipping Method", color =
['blue','yellow','pink','red','orange','lightblue'])
plt.show()
gender_purchase = data['Gender'].value_counts()
gender_purchase.plot(kind = "pie", autopct = '%.1f%%', title= "Gender")
plt.show()
discount_applied = data["Discount Applied"].value_counts()
discount_applied.plot(kind = "pie", autopct = '%.1f%%', title = "Purchases with
Discount Applied")
plt.show()
promocode_used = data["Promo Code Used"].value_counts()
promocode_used.plot(kind = "pie", autopct = '%.1f%%', title = "Impact of Promo Code
Used on Purchase")
plt.show()

You might also like