Skip to content
CampusEduX

Problem 1: Apply Standardization to a Dataset

Easypython
Learn the Concept: Feature Scaling

Problem Description

Write a Python program that applies StandardScaler to a DataFrame with two numeric columns, and prints the scaled result.

Input

A DataFrame with two numeric columns.

Output

The standardized DataFrame (mean 0, std 1 for each column).

Constraints

  • Columns will contain at least 3 numeric values each.

Example Input

text
{"age": [20, 30, 40], "salary": [30000, 50000, 70000]}

Example Output

text
(Standardized values with mean approximately 0 and std approximately 1 for each column)

Concepts Covered

StandardScaler, fit_transform().

Related Problems

  • Problem 2: Apply Normalization to a Dataset
    Easy · python
    Solve Problem
  • Problem 3: Correctly Scale Training and Test Sets Separately
    Easy · python
    Solve Problem
  • Problem 4: Compare Standardization vs Normalization on the Same Data
    Easy · python
    Solve Problem

Input (stdin)

Output

Run your code to see output here...