---
title: toPython
description: "VariantVal.toPython method in PySpark: Convert the VariantVal to a Python data structure."
canonical_url: https://docs.databricks.com/gcp/en/pyspark/reference/classes/variantval/toPython
---

# toPython

Convert the VariantVal to a Python data structure.

*Added in Databricks Runtime 15.2*

## Syntax

```python
toPython()
```

## Returns

Any - A Python object that represents the Variant.
