Enhance cleaning.py with docstrings, safety checks, unit tests, and demo notebook #17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
✨ Highlights
cleaning.pyfunctions (parameters, returns, examples).rename_columns_auto.replace_specialsand verified with manual tests.missing_summary,outlier_summary, andfill_missing.pytest -v.demo_cleaning.ipynb) showcasing the cleaning workflow on Titanic dataset.This PR improves the usability, robustness, and beginner‑friendliness of the
cleaning.pymodule by adding:Docstring Enhancements
rename_columns_autodocstring with parameters, return type, and example usage.replace_specialsand other functions for clarity and consistency.Defensive Programming (Safety Checks)
rename_columns_auto:Unit Tests
missing_summary,outlier_summary, andfill_missing.pytest -v→ all tests passed).Manual Testing
replace_specialsand confirmed expected behavior.Demo Notebook (
demo_cleaning.ipynb)✅ Value Added
🔧 Checklist
📂 Suggested Placement
tests/test_cleaning.pydemos/demo_cleaning.ipynb