P19PandasBeginnerImplement8 min

Rename and Standardize Columns

Normalize a messy vendor file so downstream code can use predictable field names.

#pandas#schema#column-names

Scenario

A CSV arrives with columns such as Customer ID, Total-Revenue, and Signup Date.

Problem statement

Create a safe column-normalization step and describe why it belongs near ingestion.

Your Task

  1. Trim whitespace.
  2. Use lowercase snake_case names.
  3. Check for collisions after normalization.

Columns

df.columns = [' Customer ID ', 'Total-Revenue', 'Signup Date']

Related Concepts

Schema validationPandas IndexData ingestion

Ready to count this problem?

Mark it complete when you have reasoned through the solution in your own words.