MIP Logo

Data Normalization: Using Python & Alteryx

This post was originally published on The Data School blog between 2018 and July 2025, before our program was renamed to MIP’s Analytics Career Accelerator. References throughout this article to “The Data School” or “DS” all refer to what is now MIP’s Analytics Career Accelerator. The program, its people, and its commitment to launching outstanding analytics careers remain the same – just under a new name.

If you are having trouble viewing this article, please report it here

One way to scale features for machine learning and for some visuals is through a process called “min-max normalization” or “min-max scaling”. This process recalculates all the values of your variables so that they fall within a certain range, usually between 0 and 1. You can use this method to make your data more comparable and contribute to a better-performing model or to build a radar chart.

However, this method may not be as effective with outliers, which can pull the minimum and/or maximum values strongly in one direction.

If you’re using Alteryx Designer, there is no particular tool that normalizes the data, however there is an easy way to quickly attain the same result.

First prepare your data and ensure that you have only numeric columns like an example below:

Add the Python tool to open a Jupiter notebook on the side:

Do not worry, you can just use a pre-made code to normalize the data.

First we import the relevant packages:

from ayx import Alteryx from sklearn import preprocessing import pandas

Imported packages will allow us to use pre-made functions to normalize the data.

Bur before that we have to load the data from Alteryx into pandas dataframe using the below line:

df=Alteryx.read(“#1”)

Add preprocessing function:

scaler = preprocessing.MinMaxScaler()

Apply the fuction to the dataset:

df[df.columns] = scaler.fit_transform(df[df.columns])

Put the resulted dataframe into Alteryx

Alteryx.write(df,1)

Run the workflow after adding the text to the Jupiter notebook and then click run in the notebook itself:

Now our data looks like this!

Alteryx Designer does not have a normalization tool, but you can use a pre-made code in a Python tool to normalize data by loading it into a pandas dataframe and applying the MinMaxScaler function from the sklearn package.

Share this post