Quick Start
Define a v2 recipe, inspect the proposed transformation and safely apply the reviewed result.
1. Install
terminal
bash
pip install eazydatafix==2.0.02. Define a reusable recipe
Declare the types and mappings that should be repeated on every new file. Recipes can be saved as JSON or YAML and reviewed in source control.
create_recipe.py
python
1import eazydatafix as edf23recipe = edf.PipelineRecipe(4 name="monthly_employees",5 columns={6 "employee_id": edf.ColumnRule(dtype="string"),7 "salary": edf.ColumnRule(dtype="number", currency_symbols=("₹",)),8 "joining_date": edf.ColumnRule(dtype="datetime", date_format="%d/%m/%Y"),9 },10)1112recipe.save("monthly_employees.json")3. Preview before applying
The review plan is bound to this exact source, recipe, selected stages and proposed output. If anything changes, apply() requires a fresh preview.
run_recipe.py
python
1import eazydatafix as edf23recipe = edf.PipelineRecipe.load("monthly_employees.json")4pipeline = edf.Pipeline(recipe)56plan = pipeline.preview("employees.csv")7print(plan.result.report())89result = pipeline.apply("employees.csv", plan)1011if result.is_ready:12 result.save("employees_output")4. Add a data contract when needed
Infer an expected schema from trusted data and validate new inputs before your analysis or model pipeline continues.
validate_input.py
python
1contract = edf.infer_schema("employees.csv")23rules = (4 edf.QualityRule("employee_id_unique", "employee_id", "unique"),5 edf.QualityRule("salary_non_negative", "salary", "min", 0),6)78validation = edf.validate_contract(9 "employees-next.csv",10 contract,11 rules,12)1314assert validation.passed, validation.to_dict()