Skip to content

Instantly share code, notes, and snippets.

@amankharwal

amankharwal/heart disease.py Secret

Created Nov 10, 2020
Embed
What would you like to do?
categorical_val.remove('target')
dataset = pd.get_dummies(df, columns = categorical_val)
from sklearn.preprocessing import StandardScaler
s_sc = StandardScaler()
col_to_scale = ['age', 'trestbps', 'chol', 'thalach', 'oldpeak']
dataset[col_to_scale] = s_sc.fit_transform(dataset[col_to_scale])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment