Examples
The Titanic quickstart notebook — profile, warnings, and clean in three calls.
The Zedda repository ships one example: a Jupyter notebook that walks through profiling, warning detection, and auto-cleaning on the Titanic dataset.
Titanic Quickstart
File: examples/titanic_quickstart.ipynb
A 4-cell, 3-markdown-cell notebook. Loads the Titanic dataset from the public DataScienceDojo mirror, profiles it, lists warnings, and cleans it.
Setup
pip install zedda[parquet]
jupyter lab examples/titanic_quickstart.ipynb
The [parquet] extra is required because the notebook passes a pandas DataFrame to Zedda, which writes a temporary Parquet file under the hood.
Cell 1 — Load and profile
import pandas as pd
import zedda as zd
url = "https://raw.githubusercontent.com/datasciencedojo/datasets/master/titanic.csv"
df = pd.read_csv(url)
zd.profile(df)
This prints the full Rich EDA report: dataset overview panel, quality score, per-column table (Survived, Pclass, Sex, Age, SibSp, Parch, Ticket, Fare, Cabin, Embarked), smart warnings (high nulls on Age and Cabin, ID-like PassengerId, high-cardinality Name and Ticket), and any correlation alerts above |r| ≥ 0.7.
Cell 2 — List every warning
zd.warnings(df)
Prints every issue ranked by severity (critical → warning → info), each with inline fix code, plus a copy-paste block at the end and the overall quality score.
Cell 3 — Auto-clean
zd.clean(df, output="titanic_clean.csv")
Notebook bug (v0.4.8): The original notebook calls zd.clean(df, apply=True), but clean() does not accept an apply argument — only path, output, and sample_size. That call would raise TypeError: clean() got an unexpected keyword argument 'apply'. The snippet above uses the correct signature.
The corrected call:
- Writes
titanic.csv.zedda-backup(or for DataFrame input, simply returns the cleaned DataFrame). - Applies every auto-fixable warning (drop PassengerId, Name, Ticket, Cabin; fill Age with median; etc.).
- Writes
titanic_clean.csvwith a newzedda_source_filecolumn. - Writes
titanic_clean_cleaning_audit.jsonrecording every fix applied. - Returns the cleaned
pandas.DataFrame.
To restore the original:
zd.clean.undo("titanic.csv")
More examples (in the docs)
The Guides section of this documentation has runnable snippets for every public function:
- Profiling Datasets —
zd.profile()andzd.scan() - Comparing Datasets —
zd.compare() - Cleaning & Fixing —
zd.fix()andzd.clean() - ML Readiness —
zd.ml_ready() - AI Q&A —
zd.ask() - HTML Reports —
zd.report()
Contributing an example
If you have a notebook or script that demonstrates a Zedda use case, contributions are welcome. See Contributing for the development setup.
See also
- Quick Start — every public function in 30 seconds.
- Python API — every argument and return type.
- CLI — the command-line equivalents.