DMV 6 Output
DMV 6 Output
Data Aggregation Problem Statement: Analyzing Sales Performance by Region in a Retail Company Datas
et: " customer_shopping_data.csv" Description: The dataset contains information about sales tra
nsactions in a retail company. It includes attributes such as transaction date, product category, quantity
sold, and sales amount. The goal is to perform data aggregation to analyze the sales performance by regi
on and identify the top-performing regions.
Tasks to Perform:
1. Import the " customer_shopping_data.csv" dataset.
2. Explore the dataset to understand its structure and content.
3. Identify the relevant variables for aggregating sales data, such as region, sales amount, and product ca
tegory.
4. Group the sales data by region and calculate the total sales amount for each region.
5. Create bar plots or pie charts to visualize the sales distribution by region.
6. Identify the top-performing regions based on the highest sales amount.
7. Group the sales data by region and product category to calculate the total sales amount for each com
bination.
8. Create stacked bar plots or grouped bar plots to compare the sales amounts across different regions
and product categories.
PYTHON CODE :
import pandas as pd
import matplotlib.pyplot as plt
# Ensure this path points to the actual location of your CSV file
df = pd.read_csv("customer_shopping_data.csv")