Exploratory Data Analysis (EDA) — Complete Guide
Six EDA steps with Python code and a running Indian e-commerce case study — structure check, quality audit, univariate analysis, bivariate relationships, time trends, and outlier investigation.
Dataset used throughout: 87,340 Indian e-commerce orders — columns include order_id, customer_id, order_date, delivery_date, city, category, amount_inr, quantity, status, payment_method, delivery_days, rating. This is the same dataset type you will encounter in real analyst roles at Indian D2C and marketplace companies.
Understand the Dataset Structure
Before any analysis, answer: how many rows and columns, what does each column mean, what data type is each column, and what does a sample of the data look like?
Data Quality Audit
Count missing values, check for duplicates, and look for values that are technically valid but logically wrong — negative prices, future delivery dates, zero-quantity orders.
Univariate Analysis — One Variable at a Time
Examine each variable individually. For numeric columns: distribution shape, central tendency, spread, outliers. For categorical columns: frequency of each category.
Bivariate Analysis — Relationships Between Variables
Examine how two variables relate to each other. Numeric vs numeric: scatter and correlation. Numeric vs categorical: box plots and grouped bar charts.
Time-Based Analysis — Trends & Seasonality
If the dataset has dates, examine trends over time, day-of-week patterns, and month-over-month changes. Indian e-commerce has strong seasonality around Diwali, year-end sales, and summer.
Outlier Detection & Investigation
Identify values that fall far from the rest. Outliers are not always errors — they can be the most interesting data points. Always investigate before removing.
EDA Checklist — Never Miss a Step
Frequently Asked Questions
What is EDA and why is it important?
EDA (Exploratory Data Analysis) is the process of examining a dataset before formal analysis or modelling — to understand its structure, spot problems, and discover patterns. It was popularised by statistician John Tukey in the 1970s and remains the most critical step in any data project. EDA is important because: (1) it reveals data quality issues (nulls, duplicates, wrong data types, inconsistent categories) that would corrupt your analysis if not caught; (2) it surfaces the shape of distributions — whether data is normally distributed, skewed, or bimodal — which affects which statistical methods you can apply; (3) it reveals relationships between variables before you build any model; (4) it often answers the business question directly, without needing a complex model. In real analyst work, EDA is not a one-time step — you return to it whenever your results look unexpected.
What are the main steps of EDA?
EDA follows six main steps: (1) Understand the dataset structure — shape, column names, data types, and a sample of rows; (2) Data quality audit — count nulls, duplicates, and check for values that are technically valid but logically wrong (negative prices, future dates on past orders); (3) Univariate analysis — examine each variable individually: distribution of numeric columns (mean, median, std, histogram), frequency counts of categorical columns; (4) Bivariate analysis — examine relationships between pairs of variables: numeric vs numeric (scatter plot, correlation), numeric vs categorical (box plots by group, grouped bar charts); (5) Time-based analysis — if date columns exist, examine trends, seasonality, and day-of-week patterns; (6) Outlier analysis — identify values that fall far from the rest and decide whether they are errors or legitimate edge cases. The order matters but is flexible — findings in one step often send you back to an earlier step.
What Python libraries are used for EDA?
The standard Python EDA stack: pandas for data loading, cleaning, and aggregation (groupby, value_counts, describe, isnull); matplotlib for basic charts (histogram, line chart, scatter); seaborn for statistical charts with better defaults (boxplot, heatmap, pairplot, violinplot); numpy for numerical operations. Some analysts also use: plotly for interactive charts (useful when you want to zoom in or hover over data points); ydata-profiling (formerly pandas-profiling) for automated EDA reports that generate summary statistics, distributions, and correlation matrices for every column with one function call. For beginners, start with pandas + seaborn — they cover 95% of EDA needs.
How is EDA different from data cleaning?
Data cleaning is the process of fixing data quality problems — filling nulls, removing duplicates, fixing data types, standardising text. EDA is the process of understanding the data — discovering its structure, distributions, relationships, and patterns. In practice, they overlap: you cannot do EDA without first knowing what is in the data (which requires some cleaning), and you cannot clean data intelligently without first understanding it (which requires some exploration). The practical workflow: run a quick initial EDA to discover what needs cleaning, clean the data, then run a deeper EDA on the cleaned data. Data cleaning is covered in Chapter 12 of this series.
EVIKA ACADEMY · NOIDA SECTOR 51
Run EDA on Real Indian Datasets in Class
Our Python module includes full EDA projects on Indian e-commerce, banking, and logistics data — from raw CSV to complete insight report.
Book Free Demo Class →