Data Cleaning and Preprocessing using Python in Visual Studio Code

Published: 20 March 2023
on channel: Dr. Mohammed Abdul Salam Gollapalli
5,002
112

Data Cleaning & Preprocessing
Step 1: Import the necessary libraries for data cleaning & preprocessing
Step 2: Read the Data from CSV file in Visual Studio Code (VSC)
Step 3: Remove unwanted features
Step 4: Strip before and after Whitespaces from entire data frame records
Step 5: Replace unwanted values with nan (empty)
Step 6: Convert Specific features from Object to Numeric datatype
Step 7: Convert Binary (Yes/No) feature values to 1 or 0 for ML
Step 8: Convert categorical variables (Gender) using LabelEncoder technique
Step 9: Convert any exceptional cases with proper numeric values
Step 10: Convert Text data feature into categories
Step 11: Convert Categorical variable using OneHotEncode technique. We will merge this later in Step 17.
Step 12: Apply KNNImputer imputation technique to fill missing values (there are many different imputation techniques)
Step 13: Apply rounding function to avoid any decimal values for Yes/No features
Step 14: View/Export the results into new CSV file to check scaled data
Step 15: Split the data based on features (independent and dependent/target variable)
Step 16: Scale the features using the MINMAX Scalar technique (all values between 0 to 1)
Step 17: Merge all the independent variables + dependent (target) variable to export and check.
Step 18: Split the data into training set and the test set.
Step 19: Check if the training data is imbalanced
Step 20: Balance the training data using SMOTE technique


On this page of the site you can watch the video online Data Cleaning and Preprocessing using Python in Visual Studio Code with a duration of hours minute second in good quality, which was uploaded by the user Dr. Mohammed Abdul Salam Gollapalli 20 March 2023, share the link with friends and acquaintances, this video has already been watched 5,002 times on youtube and it was liked by 112 viewers. Enjoy your viewing!