# Sample Realistic Data

Create realistic synthetic data data that follows the same format and mathematical properties as the real data.

### sample

Use this function to create synthetic data that mimics the real data

```python
synthetic_data = synthesizer.sample(
    num_sequences=100,
    sequence_length=None
)
```

**Parameters**

* (required) `num_sequences`: An integer >0 describing the number of sequences to sample
* `sequence_length`: An integer >0 describing the length of each sequence. If you provide `None`, the synthesizer will determine the lengths algorithmically, and the length may be different for each sequence. Defaults to `None`.

**Returns** A [pandas DataFrame](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) object with synthetic data. The synthetic data mimics the real data.


---

# 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/sampling/sample-realistic-data.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.
