text_plain_output_1.png image_output_1.png
from sklearn.preprocessing import StandardScaler

import pandas as pd

dataset = pd.read_csv('../input/Mall_Customers.csv')
pd.set_option('display.max_columns', 10)

scaler = StandardScaler()
df = pd.DataFrame(scaler.fit_transform(dataset[['Age', 'Annual Income (k$)', 'Spending Score (1-100)']]))
df.columns = ['age', 'income', 'spending']
df.insert(0, 'gender', dataset['Gender_code'])
df.head()