SigmaAnalytics & Tech
C7PythonIntermediateAbout 110 min to complete

Data Transformation

Turning raw columns into the features an analysis actually needs.

Notebook

About 110 minutes to complete

Enrol to read the notebook and download it to run.

What this module covers

Turning raw columns into the features an analysis actually needs.

By the end of it

  • Derive columns with vectorised arithmetic, np.select, and .map
  • Recode values with .replace and mapping dictionaries
  • Bin continuous variables with cut (fixed edges) and qcut (quantiles)
  • Rank within groups and compute percentiles
  • Reshape between wide and long with melt and pivot
  • Encode categories with get_dummies, avoiding the dummy trap
  • Apply log and other transforms to skewed data, and justify them
  • Build a feature engineering pipeline