# Visualization
plt.figure(figsize=(10, 8))
total_sales_by_product.plot(kind='bar')
plt.title('Total Sales by Product')
plt.xlabel('Product Name')
plt.ylabel('Total Sales')
plt.show()
plt.figure(figsize=(10, 8))
total_sales_by_category.plot(kind='bar')
plt.title('Total Sales by Category')
plt.xlabel('Category')
plt.ylabel('Total Sales')
plt.show()
plt.figure(figsize=(10, 8))
avg_price_by_product.plot(kind='bar')
plt.title('Average Price by Product')
plt.xlabel('Product Name')
plt.ylabel('Average Price')
plt.show()
plt.figure(figsize=(10, 8))
avg_price_by_category.plot(kind='bar')
plt.title('Average Price by Category')
plt.xlabel('Category')
plt.ylabel('Average Price')
plt.show()
plt.figure(figsize=(10, 8))
top_selling_products.plot(kind='bar')
plt.title('Top Selling Products')
plt.xlabel('Product Name')
plt.ylabel('Quantity Sold')
plt.show()
plt.figure(figsize=(10, 8))
top_selling_categories.plot(kind='bar')
plt.title('Top Selling Categories')
plt.xlabel('Category')
plt.ylabel('Quantity Sold')
plt.show()
print('Total Sales by Product:\n', total_sales_by_product)
print('Total Sales by Category:\n', total_sales_by_category)
print('Average Price by Product:\n', avg_price_by_product)
print('Average Price by Category:\n', avg_price_by_category)
print('Top Selling Products:\n', top_selling_products)
print('Top Selling Categories:\n', top_selling_categories)