Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

How to normalize the data to get to the same range in python pandas

# Assuming same lines from your example
cols_to_norm = ['Age','Height']
survey_data[cols_to_norm] = survey_data[cols_to_norm].apply(lambda x: (x - x.min()) / (x.max() - x.min()))
Comment

PREVIOUS NEXT
Code Example
Python :: numpy multidimensional indexing 
Python :: python global site packages 
Python :: button in flask 
Python :: xaxis matplotlib 
Python :: flask api response code 
Python :: random number pythn 
Python :: python how to get directory of script 
Python :: union df pandas 
Python :: python loop through array backwards 
Python :: prime number generator python 
Python :: pandas read_csv multiple separator 
Python :: flask make static directory 
Python :: remove duplicates based on two columns in dataframe 
Python :: python read arguments 
Python :: python get everything between two characters 
Python :: extend stack python 
Python :: python get filename without extension 
Python :: mouse module python 
Python :: random string generator python 
Python :: get adjacent cells in grid 
Python :: random forest cross validation python 
Python :: how to save array python 
Python :: pyaudio install error ubuntu 
Python :: nb_occurence in list python 
Python :: python overwrite print on same line 
Python :: how to convert a pandas series from int to float in python 
Python :: bisect_left in python 
Python :: how to check if everything inside a list is unique 
Python :: message tags in django 
Python :: python find location of module 
ADD CONTENT
Topic
Content
Source link
Name
5+9 =