---
title: where
description: "DataFrame.where method in PySpark: where is an alias for filter."
canonical_url: https://docs.databricks.com/aws/en/pyspark/reference/classes/dataframe/where
---

# where

`where` is an alias for `filter`.

## Syntax

```
where(condition: Union[Column, str])
```

## Parameters

| Parameter   | Type          | Description                                             |
| ----------- | ------------- | ------------------------------------------------------- |
| `condition` | Column or str | A Column of BooleanType or a string of SQL expressions. |

## Returns

`DataFrame`: A new DataFrame with rows that satisfy the condition.
