Skip to content

itsnishanthcodes/Task1---Data-Preprocessing

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Task 1: Data Cleaning & Preprocessing

🧠 Objective

The goal of this task was to clean and preprocess the stroke prediction dataset to make it suitable for machine learning.

🧰 Tools Used

  • Python
  • Pandas
  • NumPy
  • Seaborn / Matplotlib
  • VS Code

📁 Files Included

  • task1_preprocessing.py: All code used for loading, cleaning, encoding, standardizing, and saving the dataset.
  • cleaned_stroke_data.csv: Final cleaned dataset.
  • images/: Folder containing screenshots or plots (boxplots, missing value heatmap, etc.)

🧹 Preprocessing Steps

  1. Load Dataset: Imported CSV using pandas.
  2. Handle Missing Values: Filled missing bmi using median.
  3. Encode Categorical Features: Used pd.get_dummies() with drop_first=True.
  4. Standardize Numerical Features: Used StandardScaler from sklearn.
  5. Remove Outliers: Used boxplots and IQR method.
  6. Save Cleaned Data: Exported final dataset to cleaned_stroke_data.csv.

💾 Export Cleaned Dataset

The cleaned dataset was exported as a CSV file using pandas.DataFrame.to_csv(). You can find the final version in cleaned_stroke_data.csv.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages