spss_recode
Recode variable values in SPSS .sav files by defining old-to-new mapping rules, creating new variables to preserve originals, and saving to a specified output path.
Instructions
Recode variable values in a .sav file. rules: list of {'old': value | [lo,hi] | [v1,v2,...] | 'ELSE', 'new': value | 'COPY' | 'SYSMIS'}. into_variables: optional list of new target variables (preserves originals). output_path: optional path to save the transformed file. Requires IBM SPSS Statistics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | Yes | ||
| file_path | Yes | ||
| variables | Yes | ||
| output_path | No | ||
| into_variables | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |