Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

normalize data python pandas

import pandas as pd
from sklearn import preprocessing

x = df.values #returns a numpy array
min_max_scaler = preprocessing.MinMaxScaler()
x_scaled = min_max_scaler.fit_transform(x)
df = pd.DataFrame(x_scaled)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #normalize #data #python #pandas
ADD COMMENT
Topic
Name
1+8 =