minmax_scaling
minmax_scaling(array, columns, min_val=0, max_val=1)
Min max scaling of pandas' DataFrames.
Parameters
-
array
: pandas DataFrame or NumPy ndarray, shape = [n_rows, n_columns]. -
columns
: array-like, shape = [n_columns]Array-like with column names, e.g., ['col1', 'col2', ...] or column indices [0, 2, 4, ...]
-
min_val
:int
orfloat
, optional (default=0
)minimum value after rescaling.
-
max_val
:int
orfloat
, optional (default=1
)maximum value after rescaling.
Returns
-
df_new
: pandas DataFrame object.Copy of the array or DataFrame with rescaled columns.
Examples
For usage examples, please see http://rasbt.github.io/mlxtend/user_guide/preprocessing/minmax_scaling/