Recode script patterns
Imperative recoding — write a Python block that produces derived columns. Use this when the recode is too complex for the declarative form (multi-step, conditional on many inputs, needing intermediate values).
This page is a placeholder — the full deep-dive lands in the next docs update.
It will cover:
- When to reach for a recode script vs. a declarative recode block
- The recode-script API — what’s available, what isn’t
- Patterns: NPS rebuild from satisfaction grid, conjoint utility extraction, segment-membership rules
- Defensive patterns for missing data
- Cross-link to Python essentials