---
title: hint
description: "DataFrame.hint method in PySpark: Specifies some hint on the current DataFrame."
canonical_url: https://docs.databricks.com/aws/en/pyspark/reference/classes/dataframe/hint
---

# hint

Specifies some hint on the current DataFrame.

## Syntax

```
hint(name: str, *parameters: Union["PrimitiveType", "Column", List["PrimitiveType"]])
```

## Parameters

| Parameter    | Type                    | Description          |
| ------------ | ----------------------- | -------------------- |
| `name`       | str                     | A name of the hint.  |
| `parameters` | str, list, float or int | Optional parameters. |

## Returns

`DataFrame`: Hinted DataFrame.

## Examples

```python
df = spark.createDataFrame([(2, "Alice"), (5, "Bob")], schema=["age", "name"])
df2 = spark.createDataFrame([Row(height=80, name="Tom"), Row(height=85, name="Bob")])
df.join(df2, "name").explain()
# == Physical Plan ==
# ...
# ... +- SortMergeJoin ...
# ...

df.join(df2.hint("broadcast"), "name").explain()
# == Physical Plan ==
# ...
# ... +- BroadcastHashJoin ...
# ...
```
