3rd Part Customer Analysis
3rd Part Customer Analysis
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()