Exploratory data analysis (EDA) is the first thing any analyst should do with a new dataset. Without it you're flying blind — you won't know which columns have missing values, which variables are correlated, or whether your data is even shaped the way you expect.
Analysis Tool Box gives you two functions that cover the core of EDA: CreateDataOverview generates a statistical snapshot of every column, and PlotCorrelationMatrix shows you how variables move together.
Prerequisites
- Python 3.9+
analysistoolboxinstalled (pip install analysistoolbox)- A dataset in a pandas DataFrame (we'll use the Titanic dataset from seaborn)
Step 1: Install and import
pip install analysistoolbox seaborn
import pandas as pd
import seaborn as sns
from analysistoolbox.data_processing import CreateDataOverview
from analysistoolbox.visualizations import PlotCorrelationMatrix
Step 2: Load your data
df = sns.load_dataset('titanic')
print(df.shape) # (891, 15)
The Titanic dataset has 891 rows and 15 columns — a mix of numeric and categorical variables, with some missing values. It's a good stress test for any EDA function.
Step 3: Run CreateDataOverview
CreateDataOverview(
dataframe=df,
plot_missingness=True,
print_sample_rows=True,
)
This one call produces:
- Shape summary — row and column count
- Column-level stats — dtype, non-null count, nulls count, unique values, min/max/mean for numerics
- Missingness chart — a horizontal bar chart showing % missing per column
- Sample rows — the first few rows so you can sanity-check your data
Set plot_missingness=False if you're working in a non-visual environment (a scheduled job, a terminal without a display server, etc.). The statistical summary still prints cleanly.
Step 4: Visualize correlations
numeric_cols = df.select_dtypes(include='number').columns.tolist()
PlotCorrelationMatrix(
dataframe=df,
list_of_columns_to_analyze=numeric_cols,
color_palette='coolwarm',
)
This renders a heatmap with Pearson correlation coefficients for every numeric pair. Dark red = strong positive correlation, dark blue = strong negative.
Correlation does not imply causation — but it does tell you which variables tend to move together in your data. In the Titanic dataset, pclass (passenger class) is negatively correlated with fare, which makes intuitive sense: higher-class tickets cost more. Before modeling, use the correlation matrix to detect multicollinearity (two predictors that are highly correlated), which can inflate coefficient variance in regression models.
Step 5: What to look for
After running these two functions, ask yourself:
From CreateDataOverview:
- Which columns have the most missing values? Are they missing at random, or is there a pattern?
- Do any numeric columns have min/max values that look like data entry errors (e.g., an age of 900)?
- Are there columns with only 1 unique value? Those carry no information and can be dropped.
From PlotCorrelationMatrix:
- Are any two predictors correlated above 0.8 or below -0.8? If so, consider dropping one.
- Which predictors correlate most strongly with your outcome variable? Those are your best starting features.
That's it — you now have a complete picture of your data in under a minute.
Full code
import pandas as pd
import seaborn as sns
from analysistoolbox.data_processing import CreateDataOverview
from analysistoolbox.visualizations import PlotCorrelationMatrix
# Load data
df = sns.load_dataset('titanic')
# Overview
CreateDataOverview(dataframe=df, plot_missingness=True, print_sample_rows=True)
# Correlation matrix on numeric columns
numeric_cols = df.select_dtypes(include='number').columns.tolist()
PlotCorrelationMatrix(dataframe=df, list_of_columns_to_analyze=numeric_cols)