{"id":30021127,"url":"https://github.com/thekartikeyamishra/data-preprocessor","last_synced_at":"2026-05-08T07:32:39.252Z","repository":{"id":295137872,"uuid":"989287380","full_name":"thekartikeyamishra/data-preprocessor","owner":"thekartikeyamishra","description":"A Google Colab module for interactive data preprocessing. Handles missing values, categorical encoding (One-Hot, Label), and numerical scaling (Standard, MinMax). Outputs a cleaned dataset","archived":false,"fork":false,"pushed_at":"2025-05-23T20:12:32.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-08T07:24:32.159Z","etag":null,"topics":["ipywidgets","numpy","pandas","python","scikit-learn"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thekartikeyamishra.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-23T20:08:11.000Z","updated_at":"2025-05-23T20:13:57.000Z","dependencies_parsed_at":"2025-05-23T21:21:39.301Z","dependency_job_id":"8547d6cd-10f5-4e52-9bbd-398eaa6f070d","html_url":"https://github.com/thekartikeyamishra/data-preprocessor","commit_stats":null,"previous_names":["thekartikeyamishra/data-preprocessor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thekartikeyamishra/data-preprocessor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekartikeyamishra%2Fdata-preprocessor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekartikeyamishra%2Fdata-preprocessor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekartikeyamishra%2Fdata-preprocessor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekartikeyamishra%2Fdata-preprocessor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thekartikeyamishra","download_url":"https://codeload.github.com/thekartikeyamishra/data-preprocessor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thekartikeyamishra%2Fdata-preprocessor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32771013,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T02:36:36.067Z","status":"ssl_error","status_checked_at":"2026-05-08T02:36:07.210Z","response_time":54,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ipywidgets","numpy","pandas","python","scikit-learn"],"created_at":"2025-08-06T02:19:38.789Z","updated_at":"2026-05-08T07:32:39.216Z","avatar_url":"https://github.com/thekartikeyamishra.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Data Preprocessor Module (Colab) 🛠️\nThis Google Colab notebook is a dedicated module for applying common data preprocessing techniques to a raw dataset (typically in CSV format). It provides an interactive UI to configure and apply these transformations, preparing the data for machine learning model training.\n\n## Purpose\n\nThe primary goal of this module is to:\n1.  Enable users to **upload a dataset**.\n2.  Provide controls to define and apply **missing value imputation** strategies.\n3.  Offer methods for **categorical feature encoding** (One-Hot Encoding, Label Encoding).\n4.  Allow **numerical feature scaling** (StandardScaler, MinMaxScaler).\n5.  Output a **cleaned, preprocessed dataset** ready for model training or further analysis.\n\nThis module is conceptualized as the second \"microservice\" in a series of modular Colab notebooks, typically following a \"Data Loader \u0026 Validator\" module.\n\n## UI Overview\n\nThe module features an interactive UI to guide you through the preprocessing steps:\n\n**1. Configuration Sections:**\nAfter uploading your data and configuring column types, you can set parameters for imputation, encoding, and scaling.\n\n*(Image: `nn.PNG` provided by user)*\n![Preprocessing Configuration UI](assets/nn.PNG)\n*Caption: Configure Missing Value Imputation, Categorical Feature Encoding, and Numerical Feature Scaling.*\n\n**2. Apply \u0026 Download Section:**\nOnce configured, you apply the transformations and can download the processed dataset. The status and a preview of the processed data are also displayed.\n\n*(Image: `zx.PNG` provided by user)*\n![Apply and Download UI](assets/zx.PNG)\n*Caption: Apply preprocessing steps and download the resulting CSV or Pickle file. Status messages and a preview are shown below.*\n\n## Features\n\n* **Interactive CSV Upload:** Load the dataset to be preprocessed.\n* **Column Type Configuration:** Interactively review and confirm numerical and categorical columns.\n* **Missing Value Imputation:**\n    * Strategies for numerical columns: `mean`, `median`, or `None`.\n    * Strategies for categorical columns: `most_frequent`, `constant` fill, or `None`.\n* **Categorical Encoding:**\n    * Select specific categorical columns for encoding.\n    * Choose between `One-Hot Encoding` or `Label Encoding`, or `None`.\n* **Numerical Scaling:**\n    * Select specific numerical columns for scaling (note: options here will update if One-Hot Encoding creates new numerical columns).\n    * Choose between `StandardScaler` or `MinMaxScaler`, or `None`.\n* **Preview \u0026 Status:** View the head of the processed DataFrame and status messages.\n* **Download Processed Data:**\n    * Option to download the transformed data as a `CSV` file.\n    * Option to download the transformed data as a `Pickle` file (preserves data types better).\n\n## Order of Operations\n\nPreprocessing steps are applied in the following sequence:\n1.  Missing Value Imputation\n2.  Categorical Encoding\n3.  Numerical Scaling\n\n## How It Fits in a Workflow\n\n1.  **Input:** A CSV file containing a dataset (ideally, one that has already been loaded and initially explored, e.g., output from a \"Data Loader\" module).\n2.  **Process:** User configures and applies imputation, encoding, and scaling steps via the UI.\n3.  **Output:**\n    * A preprocessed pandas DataFrame (available in the Colab environment as `df_processed`).\n    * Downloadable `processed_data.csv` and `processed_data.pkl` files. These can serve as input to a \"Model Trainer\" module.\n\n## Setup (within Google Colab)\n\n1.  Open the notebook in Google Colab.\n2.  Run the cells in order. The necessary Python libraries (`pandas`, `numpy`, `scikit-learn`, `ipywidgets`) are installed automatically.\n3.  No external API keys or special configurations are needed.\n\n## Usage Instructions\n\n1.  **Run Cells:** Execute the Colab cells sequentially.\n    * Cell 1: Displays the introduction.\n    * Cell 2: Installs libraries and performs setup.\n    * Cell 3: Renders the main UI.\n    * Cell 4: Defines the backend preprocessing logic (triggered by button clicks in UI).\n2.  **Upload Data:**\n    * Click the \"Upload Raw CSV\" button in Section 1 of the UI.\n    * Select the CSV file from your local system.\n    * A preview of the original data and auto-detected column types will appear.\n3.  **Configure Column Types (Section 2):**\n    * Review the \"Numerical Cols\" and \"Categorical Cols\" selections. Adjust these `SelectMultiple` widgets if the auto-detection was not perfect for your specific needs.\n4.  **Configure Preprocessing Steps (Sections 3-5 - see UI Overview above):**\n    * **Missing Value Imputation:** Choose your strategies.\n    * **Categorical Encoding:** Select columns and method.\n    * **Numerical Scaling:** Select columns and method.\n5.  **Apply Preprocessing (Section 6 - see UI Overview above):**\n    * Click the \"Apply Preprocessing\" button.\n    * Status messages will appear in the main output area at the bottom.\n    * A preview of the first 5 rows of the processed data will be shown.\n6.  **Download Processed Data (Section 6):**\n    * After successful preprocessing, the \"Download Processed CSV\" and \"Download Processed Pickle\" buttons will be enabled. Click them to save your transformed dataset.\n\n## Output of this Module\n\n* **DataFrame in Memory:** The processed data is stored in a pandas DataFrame named `df_processed`.\n* **Downloadable Files:** `processed_data.csv` and `processed_data.pkl`.\n\n## Future Enhancements (Conceptual)\n\n* More sophisticated encoding options (e.g., Target Encoding, Feature Hashing).\n* Feature creation capabilities (e.g., polynomial features, date part extraction).\n* Outlier detection and handling methods.\n* Dimensionality reduction techniques (PCA).\n* Option to save and load preprocessing pipeline steps (e.g., a scikit-learn `Pipeline` object).\n\n## Contributing\n\nAs a conceptual module, improvements can be made directly within the Colab notebook structure.\n1.  Fork the (conceptual) repository.\n2.  Create a new branch.\n3.  Commit your changes.\n4.  Push to the branch.\n5.  Open a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthekartikeyamishra%2Fdata-preprocessor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthekartikeyamishra%2Fdata-preprocessor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthekartikeyamishra%2Fdata-preprocessor/lists"}