---
title: tvf
description: "SparkSession.tvf property in PySpark: Returns a TableValuedFunction that can be used to call a table-valued function (TVF)."
canonical_url: https://docs.databricks.com/gcp/en/pyspark/reference/classes/sparksession/tvf
---

# tvf

Returns a `TableValuedFunction` that can be used to call a table-valued function (TVF).

## Syntax

```
tvf
```

## Returns

`tvf.TableValuedFunction`

## Examples

```python
import pyspark.sql.functions as sf

spark.tvf.explode(sf.array(sf.lit(1), sf.lit(2), sf.lit(3))).show()
# +---+
# |col|
# +---+
# |  1|
# |  2|
# |  3|
# +---+
```
