A lightweight open-source tool to automate the EDA pipeline from reading and cleaning to visualization.
Project description
SwiftEDA SwiftEDA is a lightweight Python library that automates common data cleaning and exploratory data analysis (EDA) tasks for ML pipelines. It simplifies missing-value handling, imputation, outlier detection, visualization, and dataset reporting into just a few lines of code.
This is my first personal project and my contribution to the data science and ML community.
Features:
Phase 1 (V1) Custom CSV reader (read_csv) with: Header parsing Row alignment (handles uneven rows) Data type inference (int, float, datetime, bool, str) Missing value report generator Drop columns with high missing values Impute missing values (mean, median, mode) Tabular display of cleaned dataset One-line wrapper: clean_df() for custom control over feature usage
Phase 2 (V2) Restructured wrapper: Simple wrapper that encapsulates all helpers with kwargs for modular use. Multi-format support: Added read_json() alongside read_csv. (Excel deliberately excluded to avoid dependency bloat — save as CSV/JSON instead).
Summary statistics upgrade: Mean, median, mode, min, max, 25th percentile, 75th percentile, and IQR. Limiter function: Optional row limiter (limit=n) to prevent terminal flooding with large datasets. Wrapper help(): Callable help function that explains wrapper usage, parameters, and defaults. Improved logging: Cleaner and more descriptive status reporting.
Phase 3 (V3) Outlier detection & handling: IQR and Z-score methods. Flexible options to flag or remove outliers.
Edge-case refinement: Numeric coercion for strings like "$1,200" or "3.5%". Protection for identifiers (ZIP codes, IDs, phone numbers).
Visualization helpers: Histograms, boxplots, scatter plots, line charts. Correlation heatmaps and category frequency plots. Flexible kwargs for matplotlib/seaborn under the hood.
Comprehensive HTML report: Dataset info, missing value summary (before & after). Summary statistics, outlier summary, and selected plots. Exportable with export_html_path="report.html".
Type re-check system: recheck_types=True automatically re-infers column types after imputation/casting. Skips protected identifier columns. Logs upgrades (e.g., "Age" str → float).
SwiftEDA is developed as a learning project and personal contribution to simplify EDA workflows. The Devlog contains detailed patch notes for each version, implementation details, and real-world test case reports. Pull requests are welcome! For major changes, please open an issue first to discuss your ideas.
Example Usage (V3) from Swift_EDA_V3_Final import clean_df
Clean a dataset with outlier handling, visualization, and HTML report header, data, types = clean_df( "Titanic-Dataset.csv", drop_threshold=0.3, impute_strategy="median", outlier_method="iqr", outlier_action="flag", visualize=True, plots=[("hist", "Age"), ("scatter", "Age", "Fare"), ("heatmap", None)], summary=True, export_html_path="eda_report.html" )
print("Header:", header) print("Types:", types)
Python Version 3.12.7
License: Apache
Thank you for viewing Swift EDA! Contributions, collaborations & feedback welcome! SwiftEDA is an open source learning project & I'd love to collaborate with others who are passionate about Data Science & Python tooling. If you'd like to help improve future versions whether through ideas, testing or development or notice any bugs, please open an issue. If you've already made improvements, open a PR so we can review & merge them. I'd love to learn from your feedback. Every bit helps the project grow!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file swifteda-3.0.0.tar.gz.
File metadata
- Download URL: swifteda-3.0.0.tar.gz
- Upload date:
- Size: 27.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7d4f34a026af058f9fd91bec21f274c238953adaa0cb4191d4796302e3cb7dee
|
|
| MD5 |
649f05546c6e763907e5d2d1ec0d096e
|
|
| BLAKE2b-256 |
895e1d43958fe62ae84f5daeb5200335df890c0dea62c84075d13c6290afe10f
|
File details
Details for the file swifteda-3.0.0-py3-none-any.whl.
File metadata
- Download URL: swifteda-3.0.0-py3-none-any.whl
- Upload date:
- Size: 25.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
05b62305dfe22a2bafd144147bef46cafca2cce42697bc4f518c3c617c4b6de2
|
|
| MD5 |
a687656ed7a035374837c5c55a667be9
|
|
| BLAKE2b-256 |
7705f740e21ce2239aaab6073e7b0f7c007f0c61b1ee8daa4a010784e6b544c3
|