You can't validate what you haven't profiled
Schema validation is most useful when you actually know the shape of your data. Profiling — automated exploratory analysis that produces summary statistics, distributions, missing-value patterns, correlations, and anomalies — is the upstream activity that makes good validation possible. Profile first, then write the schema based on what you saw.
The two flavors of profiling
- Manual / quick —
df.describe(),df.info(),df.isna().mean(),df['col'].value_counts(dropna=False). The everyday muscle memory. - Automated reports —
ydata-profiling(formerlypandas-profiling) generates an interactive HTML report with type detection, distributions, correlations, missing-value patterns, and warnings. Useful for handing a profile to a colleague who hasn't seen the data.