# Data Preparation

Sequential data represents ordered records, such as in a timeseries. The entire table may contain records for a single entity (such as a user or patient). Alternatively, your table may also contain multiple, independent sequences belonging to different entities.

<figure><img src="/files/tdvX2emldgh3F9LBcyfp" alt=""><figcaption><p>This example shows sequential data related to vital signs. The table contains multiple sequences, each corresponding to a different patient. For each sequences, health measurements change over time.</p></figcaption></figure>

Before you begin creating synthetic data, it's important to have your data ready in the right format:

1. **Data**, a dictionary that maps every table name to a pandas DataFrame object containing the actual data
2. **Metadata**, a [Metadata](/sdv/sequential-data/data-preparation/creating-metadata.md) object that describes your table. It includes the data types in each column, keys and other identifiers.

<details>

<summary>Click to see the table's metadata</summary>

```python
{
    "METADATA_SPEC_VERSION": "SINGLE_TABLE_V1",
    "sequence_key": "Patient ID",
    "sequence_index": "Time",
    "columns": {
        "Patient ID": { "sdtype": "id", "regex_format": "ID_[0-9]{3}" },
        "Address": { "sdtype": "address", "pii": True },
        "Smoker": { "sdtype": "boolean" },
        "Time": { "sdtype": "datetime", "datetime_format": "%m/%d/%Y" },
        "Heart Rate": { "sdtype": "categorical" },
        "Systolic BP": { "sdtype": "numerical" }
    }
}
```

</details>

### Learn More

<table data-card-size="large" data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><a href="/pages/S4AKidpjNPf5VIK8C8UK"><strong>Loading Data</strong></a></td><td>Get started with a demo dataset or load your own data.</td><td><a href="/pages/S4AKidpjNPf5VIK8C8UK">/pages/S4AKidpjNPf5VIK8C8UK</a></td></tr><tr><td><a href="/pages/q10WBdeV4PUZs6W5hlNj"><strong>Creating Metadata</strong></a></td><td>Create an object to describe the different columns in your data. Save it for future use.</td><td><a href="/pages/q10WBdeV4PUZs6W5hlNj">/pages/q10WBdeV4PUZs6W5hlNj</a></td></tr></tbody></table>


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.sdv.dev/sdv/sequential-data/data-preparation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
