Suppose I have an overview of the pandas frame data:
I want to normalize the data in each column by doing:
surveyData_norm = (surveyData - surveyData.mean()) / (surveyData.max() - surveyData.min())
This will work fine if my data table contains only those columns that I wanted to normalize. However, I have several columns containing string data preceding the following:
Name State Gender Age Income Height Sam CA M 13 10000 70 Bob AZ M 21 25000 55 Tom FL M 30 100000 45
I only want to normalize the Age, Income, and Height columns, but my method above does not work due to the string data in the status and gender columns.
python pandas
Jeremy
source share