Learn to scale features
- Scaling vs. Normalization
- How to Use StandardScaler and MinMaxScaler Transforms in Python
- Data normalization with Pandas and Scikit-Learn
After completing the exercises below, you should be comfortable with
- What is z-score scaling?
- What is min-max scaling?
- What is normalizing
- Scaling data use above methods
★☆☆ - Easy
★★☆ - Medium
★★★ - Challenging
★★★★ - Bonus
Create the following data frame
df = pd.DataFrame({"home_runs": [ 30, 22, 17, 12, 44, 38, 40],
"salary_in_k":[ 700, 450,340, 250, 1200, 800, 950 ]})
home_runs salary_in_k
0 30 700
1 22 450
2 17 340
3 12 250
4 44 1200
5 38 800
6 40 950
Scale the data using min-max scaler on the scale of 0 to 100
Use StandardScalar to scale the above data.
Normalize the above data
Inspect the data, and scale all numeric columns