Spss Import Csv
spss_import_csvConverts CSV files to SPSS .sav format using pandas and pyreadstat, so you can prepare data for SPSS without installing IBM SPSS Statistics. Saves output beside the CSV or to a custom path.
Instructions
Convert a CSV file to SPSS .sav format directly using pandas + pyreadstat — no IBM SPSS Statistics installation required. Much faster than going through SPSS syntax because it bypasses the SPSS engine entirely. Saves the .sav file next to the CSV by default, or to a custom output_path.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"csv_path": "<csv_path>"
},
"name": "spss_import_csv"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| csv_path | Yes | Full path to the source CSV file. | |
| encoding | No | CSV file encoding (default: utf-8). | utf-8 |
| delimiter | No | Column delimiter (default: comma). | , |
| output_path | No | Destination .sav file path. Defaults to the same directory as the CSV with .sav extension. | |
| column_labels | No | Mapping of column names to SPSS variable labels, e.g. {"age": "Age of respondent"}. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |