How to normalize all columns in a dataframe?

Request for alternative techniques to normalize all columns in a dataframe, current method uses Python dictionary but seeking more efficient options. Code that I used is available.

Note: Using apply() and lambda() functions to normalize a DataFrame is a bit slower method. However, it can be useful when you need to apply a custom normalization formula.

There is a much more efficient method for doing what you want to do, it involves using the MinMaxScaler class from sklearn and the advantage of this method is that it can work on large datasets too. Here is an example code that uses this:

MinMaxScaler scales the values in each column to a range between 0 and 1, based on the minimum and maximum values in each column. Hence, you have a normalized or standardized dataframe as an output.