Wa0002.
Wa0002.
### **Steps**:
1. **Setup**:
2. **Dataset**:
- Use a sample dataset such as “Superstore Sales” or any other dataset that includes
columns like `Order Date`, `Region`, `Sales`, `Profit`, and `Category`.
- If you don’t have a dataset, you can create a small CSV file or use an online dataset (e.g.,
from Kaggle).
3. **Objectives**:
```python
# Import libraries
Import pandas as pd
Import numpy as np
# Load dataset
Df = pd.read_csv(‘sales_data.csv’)
Print(df.head())
Print(df.info())
Print(df.describe())
Df.dropna(inplace=True)
Plt.figure(figsize=(10, 6))
Plt.xlabel(‘Month-Year’)
Plt.ylabel(‘Sales’)
Plt.xticks(rotation=45)
Plt.grid()
Plt.show()
Category_profit = df.groupby(‘Category’)[‘Profit’].sum().reset_index()
Print(“Profit by Category:”)
Print(category_profit)
Plt.title(‘Profit by Category’)
Plt.xlabel(‘Total Profit’)
Plt.ylabel(‘Category’)
Plt.show()
Region_sales = df.groupby(‘Region’)[‘Sales’].sum().reset_index()
Print(“Sales by Region:”)
Print(region_sales)
Plt.title(‘Sales by Region’)
Plt.xlabel(‘Region’)
Plt.ylabel(‘Total Sales’)
Plt.show()
```
### **Tasks**:
2. Explore additional columns and add more analyses (e.g., analyzing discounts or
customer segments).
Let me know if you want help setting up the dataset or expanding the project!