🔵 Data Science  ·  Lesson 41

Exploratory Data Analysis (EDA)

Exploratory Data Analysis (EDA)

What is Exploratory Data Analysis?

Exploratory Data Analysis means eDA is the process of understanding data before building a model. It checks structure, missing values, summary and patterns.

In real programs, this topic helps in understanding data before modelling. Learn the idea first, then type the program yourself and compare the output.

💡 At a Glance
PointDetails
Course AreaData Science
Tools and concepts used to analyse, clean and present data.
Main Useunderstanding data before modelling
Example Fileexploratory-data-analysis.py
Practice FocusRun, change values, and explain the output line by line.

Why should you learn this?

  • It is useful for understanding data before modelling.
  • It connects with finding patterns.
  • It improves your ability to read, write and debug Python programs.

Important Terms

These terms are used directly in this lesson. Understand them before memorising the code.

TermMeaning
shapeDimensions of an array.
describedescribe is an important term in this topic.
infoinfo is an important term in this topic.
missing valuesBlank or unavailable data values.
patternspatterns is an important term in this topic.

Syntax / Basic Pattern

The simple pattern is: prepare data, apply the concept, then show the result.

Basic Pattern
import pandas as pd
df = pd.DataFrame({"Age": [15, 16, 17], "Marks": [80, 90, 85]})
print(df.shape)
print(df.describe())
print(df.isnull().sum())

Complete Example Program

Python – exploratory-data-analysis.py
import pandas as pd

df = pd.DataFrame({"Age": [15, 16, 17], "Marks": [80, 90, 85]})

print(df.shape)
print(df.describe())
print(df.isnull().sum())

Expected Output

(3, 2) Age Marks count 3.0 3.0 ... Age 0 Marks 0 dtype: int64

Program Explanation

  • import pandas as pd imports ready-made features from a module/library.
  • df = pd.DataFrame({"Age": [15, 16, 17], "Marks": [80, 90, 85]}) stores a value in df.
  • print(df.shape) displays information or calculated result on the screen.
  • print(df.describe()) displays information or calculated result on the screen.
  • print(df.isnull().sum()) displays information or calculated result on the screen.

Where will you use it?

  • Understanding data before modelling.
  • Finding patterns.
  • Detecting outliers.

Common Mistakes

  • Analysing data before checking missing values, duplicates and data types.
  • Changing original data without keeping a clean copy.
  • Creating charts without title, labels or explanation.

Practice Tasks

  1. Type the program in exploratory-data-analysis.py and run it.
  2. Change input values or sample data and observe the new output.
  3. Create one example related to understanding data before modelling.
  4. Write 5 lines explaining the logic in your own words.

Summary

Exploratory Data Analysis is not a theory-only topic. You should be able to explain the meaning, write the example, run it successfully, and use it in a small practical program.

Exploratory Data Analysis क्या है?

Exploratory Data Analysis ka matlab hai: EDA is the process of understanding data before building a model. It checks structure, missing values, summary and patterns. Simple words me, ye topic practical Python programs likhne me direct use hota hai.

Is topic ko sirf definition ke liye nahi, balki understanding data before modelling jaise real examples ke liye practice karein.

यह क्यों सीखना जरूरी है?

  • Ye understanding data before modelling me kaam aata hai.
  • Ye finding patterns se bhi connected hai.
  • Isse aap code ka output aur errors better samajh paate hain.

Important Terms

TermMeaning
shapeDimensions of an array.
describedescribe is an important term in this topic.
infoinfo is an important term in this topic.
missing valuesBlank or unavailable data values.
patternspatterns is an important term in this topic.

Syntax / Basic Pattern

Basic idea: pehle data तैयार करें, phir Python logic apply करें, aur finally result display करें.

Basic Pattern
import pandas as pd
df = pd.DataFrame({"Age": [15, 16, 17], "Marks": [80, 90, 85]})
print(df.shape)
print(df.describe())
print(df.isnull().sum())

Complete Example Program

Python – exploratory-data-analysis.py
import pandas as pd

df = pd.DataFrame({"Age": [15, 16, 17], "Marks": [80, 90, 85]})

print(df.shape)
print(df.describe())
print(df.isnull().sum())

Expected Output

(3, 2) Age Marks count 3.0 3.0 ... Age 0 Marks 0 dtype: int64

Program Explanation

  • import pandas as pd imports ready-made features from a module/library.
  • df = pd.DataFrame({"Age": [15, 16, 17], "Marks": [80, 90, 85]}) stores a value in df.
  • print(df.shape) displays information or calculated result on the screen.
  • print(df.describe()) displays information or calculated result on the screen.
  • print(df.isnull().sum()) displays information or calculated result on the screen.

Practical Uses

  • Understanding data before modelling.
  • Finding patterns.
  • Detecting outliers.

Common Mistakes

  • Analysing data before checking missing values, duplicates and data types.
  • Changing original data without keeping a clean copy.
  • Creating charts without title, labels or explanation.

Practice Tasks

  1. Program ko exploratory-data-analysis.py file me type karke run karein.
  2. Values change karke output compare karein.
  3. understanding data before modelling par ek छोटा example banayen.
  4. Logic ko apne words me 5 lines me likhein.

सारांश

Exploratory Data Analysis ko tab complete maanenge jab aap iska meaning, example, output aur practical use clearly explain kar saken.

← Back to Python Tutorial