{"id":56207,"date":"2024-07-17T12:16:20","date_gmt":"2024-07-17T06:46:20","guid":{"rendered":"https:\/\/www.guvi.in\/blog\/?p=56207"},"modified":"2026-07-10T11:41:38","modified_gmt":"2026-07-10T06:11:38","slug":"exploratory-data-analysis-eda-in-data-science","status":"publish","type":"post","link":"https:\/\/www.guvi.in\/blog\/exploratory-data-analysis-eda-in-data-science\/","title":{"rendered":"Exploratory Data Analysis in Data Science: Step-by-Step Guide"},"content":{"rendered":"\n<p><strong>Exploratory Data Analysis (EDA) is the process of examining a dataset using statistics and visuals before you build any model.<\/strong> It helps you spot missing values, outliers, and relationships between variables so your machine learning model isn&#8217;t built on shaky data.<\/p>\n\n\n\n<p>Here&#8217;s what EDA in data science typically involves:<\/p>\n\n\n\n<ul>\n<li>Checking data structure with <code>df.info()<\/code> and <code>df.describe()<\/code><\/li>\n\n\n\n<li>Finding and handling missing values<\/li>\n\n\n\n<li>Visualizing distributions with histograms and box plots<\/li>\n\n\n\n<li>Spotting correlations with a heatmap<\/li>\n\n\n\n<li>Detecting outliers before modeling<\/li>\n\n\n\n<li>Studying relationships between variables (bivariate and multivariate analysis)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>TL;DR Summary<\/strong><\/h2>\n\n\n\n<p>EDA in data science is the step where you explore a raw dataset to understand its shape, quality, and patterns before modeling. You use tools like <code>df.describe()<\/code>, <code>sns.heatmap()<\/code>, and <code>plt.hist()<\/code> to check distributions, missing values, and correlations. Skipping EDA is one of the most common reasons machine learning models underperform in production.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.placementpreparation.io\/mock-test\/?utm_source=guvi&amp;utm_medium=blog_banner&amp;utm_campaign=exploratory_data_analysis_eda_in_data_science_horizontal\" target=\"_blank\" rel=\"noopener\"><img decoding=\"async\" width=\"1200\" height=\"317\" src=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/06\/mock-test-horizontal-banner-placement-success-1200x317.png\" alt=\"mock test horizontal banner placement success\" class=\"wp-image-117109\" srcset=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/06\/mock-test-horizontal-banner-placement-success-1200x317.png 1200w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/06\/mock-test-horizontal-banner-placement-success-300x79.png 300w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/06\/mock-test-horizontal-banner-placement-success-768x203.png 768w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/06\/mock-test-horizontal-banner-placement-success-1536x406.png 1536w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/06\/mock-test-horizontal-banner-placement-success-2048x541.png 2048w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/06\/mock-test-horizontal-banner-placement-success-150x40.png 150w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" title=\"\"><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Why Exploratory Data Analysis Still Matters in 2026?<\/strong><\/h2>\n\n\n\n<p>Most data science tutorials jump straight to model building. That&#8217;s a mistake.<\/p>\n\n\n\n<p>A model trained on unexamined data will quietly learn from missing values, duplicate rows, and outliers you never caught. EDA is where you catch these problems while they&#8217;re still cheap to fix.<\/p>\n\n\n\n<div style=\"background-color: #099f4e; border: 3px solid #110053; border-radius: 12px; padding: 18px 22px; color: #ffffff; font-size: 18px; font-family: Montserrat, Helvetica, sans-serif; line-height: 1.6; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); max-width: 750px;\"><strong style=\"font-size: 22px; color: #ffffff;\">\ud83d\udca1 Did You Know?<\/strong><br \/><br \/>Data scientists spend close to 80% of their project time on data preparation and exploration, not on building the actual model, according to widely cited industry surveys on data science workflows.<\/div>\n\n\n\n<p>If you&#8217;re building your EDA skills from scratch, HCL GUVI&#8217;s <a href=\"https:\/\/www.guvi.in\/zen-class\/data-science-course\/?utm_source=blog&amp;utm_medium=hyperlink&amp;utm_campaign=eda-in-data-science\" target=\"_blank\" rel=\"noreferrer noopener\">Data Science Course<\/a> covers Pandas, NumPy, and visualization tools with real projects.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>EDA Checklist: 10 Steps Before Every ML Project<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"628\" src=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/ChatGPT-Image-Jul-6-2026-09_01_10-PM-1200x628.webp\" alt=\"EDA Checklist: 10 Steps Before Every ML Project\" class=\"wp-image-121363\" srcset=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/ChatGPT-Image-Jul-6-2026-09_01_10-PM-1200x628.webp 1200w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/ChatGPT-Image-Jul-6-2026-09_01_10-PM-300x157.webp 300w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/ChatGPT-Image-Jul-6-2026-09_01_10-PM-768x402.webp 768w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/ChatGPT-Image-Jul-6-2026-09_01_10-PM-1536x803.webp 1536w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/ChatGPT-Image-Jul-6-2026-09_01_10-PM-150x78.webp 150w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/ChatGPT-Image-Jul-6-2026-09_01_10-PM.webp 1734w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" title=\"\"><\/figure>\n\n\n\n<p>Run through this before you touch a single model:<\/p>\n\n\n\n<ol>\n<li>Load the dataset and check its shape with <code>df.shape<\/code><\/li>\n\n\n\n<li>Preview rows using <code>df.head()<\/code> and <code>df.tail()<\/code><\/li>\n\n\n\n<li>Check data types with <code>df.info()<\/code><\/li>\n\n\n\n<li>Get summary statistics with <code>df.describe()<\/code><\/li>\n\n\n\n<li>Count missing values with <code>df.isnull().sum()<\/code><\/li>\n\n\n\n<li>Check for duplicate rows with <code>df.duplicated().sum()<\/code><\/li>\n\n\n\n<li>Plot distributions for numeric columns using <code>plt.hist()<\/code><\/li>\n\n\n\n<li>Visualize correlations using <code>sns.heatmap()<\/code><\/li>\n\n\n\n<li>Detect outliers using box plots or the IQR method<\/li>\n\n\n\n<li>Study relationships between key variables (bivariate analysis)<\/li>\n<\/ol>\n\n\n\n<p>Keep this list open in a second tab the first few times. It becomes muscle memory fast.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>EDA Walkthrough Using the Titanic Dataset<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1200\" height=\"630\" src=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/ChatGPT-Image-Jul-6-2026-09_03_41-PM-1200x630.webp\" alt=\"EDA Walkthrough Using the Titanic Dataset\" class=\"wp-image-121364\" srcset=\"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/ChatGPT-Image-Jul-6-2026-09_03_41-PM-1200x630.webp 1200w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/ChatGPT-Image-Jul-6-2026-09_03_41-PM-300x158.webp 300w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/ChatGPT-Image-Jul-6-2026-09_03_41-PM-768x403.webp 768w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/ChatGPT-Image-Jul-6-2026-09_03_41-PM-1536x807.webp 1536w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/ChatGPT-Image-Jul-6-2026-09_03_41-PM-150x79.webp 150w, https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2026\/07\/ChatGPT-Image-Jul-6-2026-09_03_41-PM.webp 1731w\" sizes=\"(max-width: 1200px) 100vw, 1200px\" title=\"\"><\/figure>\n\n\n\n<p>Theory only takes you so far. Here&#8217;s EDA applied to the <a href=\"https:\/\/www.kaggle.com\/datasets\/yasserh\/titanic-dataset\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">Titanic dataset<\/a>, a common beginner dataset for classification problems.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1: Load and inspect the data<\/strong><\/h3>\n\n\n\n<p>python<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import pandas as pd\n\ndf = pd.read_csv('titanic.csv')\ndf.head()\ndf.info()<\/code><\/pre>\n\n\n\n<p>This tells you column names, data types, and how many non-null values each column has.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2: Summary statistics with df.describe()<\/strong><\/h3>\n\n\n\n<p>python<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>df.describe()<\/code><\/pre>\n\n\n\n<p>For the Titanic dataset, this instantly shows you that the average passenger age is around 29 to 30, fares are heavily right-skewed, and <code>Age<\/code> has missing values that need handling.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3: Check missing data<\/strong><\/h3>\n\n\n\n<p>python<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>df.isnull().sum()<\/code><\/pre>\n\n\n\n<p>The <code>Age<\/code> and <code>Cabin<\/code> columns usually show the most missing values in this dataset. This decides whether you impute, drop, or flag them as a separate category.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 4: Visualize distributions with plt.hist()<\/strong><\/h3>\n\n\n\n<p>python<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import matplotlib.pyplot as plt\n\ndf&#91;'Fare'].hist(bins=30)\nplt.title('Fare Distribution')\nplt.xlabel('Fare')\nplt.ylabel('Passengers')\nplt.show()<\/code><\/pre>\n\n\n\n<p>This shows most passengers paid low fares, with a long tail of expensive first-class tickets, a classic sign you&#8217;ll need to handle skew before modeling.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 5: Correlation heatmap with sns.heatmap()<\/strong><\/h3>\n\n\n\n<p>python<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import seaborn as sns\n\nsns.heatmap(df.corr(numeric_only=True), annot=True, cmap='coolwarm')\nplt.title('Correlation Heatmap')\nplt.show()<\/code><\/pre>\n\n\n\n<p>On Titanic, this usually reveals that <code>Pclass<\/code> and <code>Fare<\/code> are moderately correlated with <code>Survived<\/code>, which is a strong early signal for feature selection.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 6: Bivariate check<\/strong><\/h3>\n\n\n\n<p>python<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>sns.boxplot(x='Survived', y='Age', data=df)\nplt.show()<\/code><\/pre>\n\n\n\n<p>A quick box plot like this can reveal whether age had any real relationship with survival, or whether it&#8217;s mostly noise.<\/p>\n\n\n\n<p>If you&#8217;re working with a housing price dataset instead, the exact same six steps apply. Swap <code>Survived<\/code> for <code>SalePrice<\/code>, and the heatmap step becomes even more important since housing data usually has many correlated numeric features.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Common EDA Mistakes Data Scientists Make<\/strong><\/h2>\n\n\n\n<ol>\n<li><strong>Skipping the missing value check:<\/strong> Jumping straight to visualization without running <code>df.isnull().sum()<\/code> first often leads to silently biased charts and models.<\/li>\n\n\n\n<li><strong>Ignoring outliers:<\/strong> A handful of extreme values can distort your mean, correlation, and even your model&#8217;s decision boundary. Always look before you decide to keep or remove them.<\/li>\n\n\n\n<li><strong>Reading <code>df.describe()<\/code> only for numeric columns:<\/strong> Categorical columns need their own check with <code>df['col'].value_counts()<\/code>. Skipping this hides class imbalance problems.<\/li>\n\n\n\n<li><strong>Treating EDA as a one-time step:<\/strong> New features, joins, or cleaned versions of the data all deserve a fresh round of EDA. Don&#8217;t assume your first pass still applies.<\/li>\n\n\n\n<li><strong>Overplotting without a question:<\/strong> Making twenty charts without asking what you&#8217;re checking for wastes time. Every plot should answer something specific.<\/li>\n<\/ol>\n\n\n\n<p>Want to practice EDA on real datasets with guided feedback? HCL GUVI&#8217;s <a href=\"https:\/\/www.guvi.in\/courses\/data-science\/data-analysis-with-pandas\/?utm_source=blog&amp;utm_medium=hyperlink&amp;utm_campaign=eda-in-data-science-python-guide\" target=\"_blank\" rel=\"noreferrer noopener\">Data Analytics Using Pandas<\/a> course walks through exactly this kind of workflow.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>EDA is not a box to tick before modeling, it&#8217;s the step that decides whether your model is trustworthy. Running through <code>df.describe()<\/code>, missing value checks, histograms, and a correlation heatmap on every new dataset takes minutes but saves hours of debugging later. Start applying this checklist on a Kaggle dataset like Titanic or Housing Prices, and it will quickly become second nature.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>FAQs<\/strong><\/h2>\n\n\n<div id=\"rank-math-faq\" class=\"rank-math-block\">\n<div class=\"rank-math-list \">\n<div id=\"faq-question-1783051482727\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What is EDA in data science?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>EDA, or Exploratory Data Analysis, is the process of examining a dataset using statistics and visualizations to understand its structure, quality, and patterns before building a model.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1783051484851\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \"><strong>Which Python libraries are used for EDA?<\/strong><\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Pandas for data handling, Matplotlib and Seaborn for visualization, and NumPy for numerical operations are the most commonly used libraries for EDA.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1783051493184\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">Is EDA necessary before every machine learning project?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Yes. Skipping EDA often means models are trained on missing values, outliers, or unbalanced classes that go unnoticed until the model underperforms in production.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1783051498908\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">What is the difference between EDA and data cleaning?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>Data cleaning fixes issues like missing values and duplicates. EDA is the broader process of exploring the data, which often uncovers the issues that data cleaning then fixes.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1783051504028\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">Which dataset is best for practicing EDA as a beginner?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>The Titanic dataset and the Boston or Ames Housing dataset are commonly used for beginners because they&#8217;re small, well documented, and have a mix of numeric and categorical features.<\/p>\n\n<\/div>\n<\/div>\n<div id=\"faq-question-1783051508700\" class=\"rank-math-list-item\">\n<h3 class=\"rank-math-question \">How long does it take to learn EDA?<\/h3>\n<div class=\"rank-math-answer \">\n\n<p>With consistent practice on two or three real datasets, most beginners get comfortable with core EDA steps like df.describe(), histograms, and correlation heatmaps within two to three weeks.<\/p>\n\n<\/div>\n<\/div>\n<\/div>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>Exploratory Data Analysis (EDA) is the process of examining a dataset using statistics and visuals before you build any model. It helps you spot missing values, outliers, and relationships between variables so your machine learning model isn&#8217;t built on shaky data. Here&#8217;s what EDA in data science typically involves: TL;DR Summary EDA in data science [&hellip;]<\/p>\n","protected":false},"author":22,"featured_media":121366,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"views":"30613","authorinfo":{"name":"Lukesh S","url":"https:\/\/www.guvi.in\/blog\/author\/lukesh\/"},"thumbnailURL":"https:\/\/www.guvi.in\/blog\/wp-content\/uploads\/2024\/07\/ChatGPT-Image-Jul-6-2026-09_06_09-PM-300x116.webp","_links":{"self":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/56207"}],"collection":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/users\/22"}],"replies":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/comments?post=56207"}],"version-history":[{"count":43,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/56207\/revisions"}],"predecessor-version":[{"id":122541,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/posts\/56207\/revisions\/122541"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/media\/121366"}],"wp:attachment":[{"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/media?parent=56207"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/categories?post=56207"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.guvi.in\/blog\/wp-json\/wp\/v2\/tags?post=56207"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}