What is EDA?#
Exploratory Data Analysis is the detective work you do before conclusions: understand what's in the data, check its quality, and discover patterns, relationships and surprises - with statistics and charts.
EDA (Exploratory Data Analysis) = data की जासूसी। निष्कर्ष निकालने से पहले data को अच्छे से समझना - उसमें क्या है, कितना साफ़ है, कौन-से pattern हैं, कौन-सी चीज़ें अजीब (surprising) हैं।
एक अच्छा EDA हमेशा सवालों से शुरू होता है, हर finding के साथ सबूत (number या chart) होता है, और आखिर में insights + सुझाव लिखे जाते हैं।
The EDA framework#
| Step | Questions | Tools |
|---|---|---|
| 1. Understand | What does one row mean? What are the columns? Time period? | head, info, data dictionary |
| 2. Quality | Missing? Duplicates? Wrong types? Impossible values? | isna, duplicated, describe |
| 3. Univariate | Distribution of each important column | value_counts, hist, describe |
| 4. Bivariate | How do pairs relate? (category vs sales, discount vs profit) | groupby, pivot_table, scatter, corr |
| 5. Time | Trends, seasonality, growth | resample, line charts |
| 6. Segments | Which customers/products/regions behave differently? | groupby, ranking, RFM |
| 7. Insights | So what? What should the business do? | written summary |
Guided EDA - Vindhya Mart#
Run each block and write down one finding after each.
1-2. Understand and check quality#
3. Univariate#
4. Bivariate#
5. Time patterns#
6. Segments#
7. Write insights#
Example format:
Finding: Technology is 70% of sales but only 43% of profit (8.3% margin), and 54 of the 57 loss-making orders are Technology orders at 15%+ discount. So what: discounts on phones and laptops wipe out their thin margin. Action: cap Technology discounts at 10%; use free accessories instead of price cuts.
Your turn - Kaggle Diwali Sales EDA#
Link: kaggle.com/datasets/saadharoon27/diwali-sales-dataset
Sales of an Indian retail store during the Diwali festival - customer gender, age group, marital status, state, zone, occupation, product category, number of orders and amount. File: Diwali Sales Data.csv (~11,000 rows).
Work in Google Colab (free, nothing to install) or Jupyter:
import pandas as pd
df = pd.read_csv("Diwali Sales Data.csv", encoding="unicode_escape") # this file needs this encoding
- Understand: shape, columns, data types, what one row represents.
- Clean: drop empty/unnamed columns, handle missing
Amount, fix data types, check duplicates. - Univariate: distribution of Amount (histogram), counts by Gender, Age Group, Marital_Status, Occupation.
- Bivariate: total Amount by Gender; by Age Group and Gender together; by State (top 10); by Occupation; by Product_Category (top 10).
- Charts: at least 6 clear charts with insight titles.
- Segments: who is the most valuable customer group? (Combine gender + age group + marital status + state.)
- Insights: write 5 insights and 3 recommendations for next Diwali's marketing (which customers, states and categories to target).
- Share: download the notebook (.ipynb) and keep it for your portfolio / GitHub.
Column names in Kaggle files can include spaces and odd capitalisation - run df.columns first, and rename with df.columns = df.columns.str.strip().str.lower().str.replace(" ", "_") to make them easy to type.
Summary#
- EDA = understand → quality → univariate → bivariate → time → segments → insights.
- Back every finding with a number or chart; write insights as finding + so what + action.
- You've practised a full EDA on Vindhya Mart and will repeat it independently on real Kaggle data.