> For the complete documentation index, see [llms.txt](https://help.metaforms.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.metaforms.ai/data-processing/python.md).

# Python

Metaforms' Data Validation module helps QA and data processing teams verify that survey data matches the questionnaire design. Rather than manually writing and running validation scripts, the platform uses AI to automatically generate checks that catch programming errors, data mismatches, and logic failures — at scale and with far less room for human error.

> **Important:** Data Validation focuses on **data correctness checks**, not data cleaning. It verifies whether the survey was programmed correctly and whether the collected data is consistent with the questionnaire. Features like identifying speeders, straight-liners, or nonsensical open-ended responses are part of the product roadmap and are not included in the current release.

Data Validation with Python uses an uploaded **.SAV** file (SPSS format) containing both the data and metadata from the programmed survey. Scripts are generated and executed directly within the platform, and you can export a validation report.

***

### The 4-step workflow

1. **Setting Up a Data Validation Project** — Create the project, upload your questionnaire and SAV file, and let the AI generate the validation scripts.
2. **Understanding the Interface** — Get familiar with the Checks and Respondents views.
3. **Reviewing and Editing Validation Scripts** — Review the AI-generated logic, mark scripts as reviewed, and customise where needed.
4. **Running Checks and Reviewing Results** — Run all checks against the dataset, drill into flagged respondents, and export the validation report.

For a summary of the question types, sub-scenarios, and validation checks supported today (and what's on the roadmap), see [Validation coverage](https://help.metaforms.ai/data-processing/python/validation-coverage.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.metaforms.ai/data-processing/python.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
