Last active
January 28, 2020 14:15
-
-
Save lakshay-arora/78e837428d481c635b37146aa7ba104f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# pre-processsing step | |
# Drop the columns - | |
# Impute the missing values in column Item_Weight by mean | |
# Scale the data in the column Item_MRP | |
pre_process = ColumnTransformer(remainder='passthrough', | |
transformers=[('drop_columns', 'drop', ['Item_Identifier', | |
'Outlet_Identifier', | |
'Item_Fat_Content', | |
'Item_Type', | |
'Outlet_Identifier', | |
'Outlet_Size', | |
'Outlet_Location_Type', | |
'Outlet_Type' | |
]), | |
('impute_item_weight', SimpleImputer(strategy='mean'), ['Item_Weight']), | |
('scale_data', StandardScaler(),['Item_MRP'])]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment