simplify.numeric

simplify.numeric(df, target='target')

Perform exploratory data analysis (EDA) on numerical features in a dataset.

This function generates visualizations for numerical columns to help with initial exploratory analysis. It produces a missing values plot, box plots for each feature, distribution histograms, and a correlation matrix heatmap.

Parameters

Name Type Description Default
df pandas.DataFrame A pandas DataFrame containing the numeric dataset to be analyzed. required
target str The name of the target column. 'target'

Returns

Name Type Description
dict A dictionary containing Altair plot objects: - ‘missing_vals’: Bar chart showing missing value counts per column - ‘box_plot’: Box plots for each feature column - ‘distribution’: Histograms for each feature stacked vertically - ‘correlation’: Correlation matrix heatmap of features

Raises

Name Type Description
TypeError If df is not a pandas DataFrame or target is not a string
ValueError If target name is not found in the DataFrame

Examples

>>> import pandas as pd
>>> df = pd.DataFrame({
...     "popularity": [80, 75, 90, 85],
...     "danceability": [0.8, 0.6, 0.9, 0.7],
...     "energy": [0.7, 0.8, 0.6, 0.9],
...     "target": [1, 0, 0, 1]
... })
>>> result = numeric(df, "target")
>>> result.keys()
dict_keys(['missing_vals', 'box_plot', 'distribution', 'correlation'])