0PricingLogin
Learn AI with Python · Lesson

Univariate Analysis

Distribution plots, histograms, box plots, count plots for individual feature understanding.

What Is Univariate Analysis?

Univariate analysis examines one variable at a time to understand its distribution: center, spread, shape, and unusual values.

The right plot depends on the variable type:

  • Numeric → histogram, KDE, box plot, violin plot
  • Categorical → count plot (bar chart of frequencies)

Setting Up the Plotting Libraries

We use Matplotlib (plt) and Seaborn (sns). Seaborn sits on top of Matplotlib with nicer defaults for statistical plots.

import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd

sns.set_theme(style="whitegrid")
df = pd.read_csv("data.csv")

All lessons in this course

  1. EDA Workflow and Data Profiling
  2. Univariate Analysis
  3. Bivariate and Multivariate Analysis
  4. Feature Distribution and Target Analysis
← Back to Learn AI with Python