---
title: isLocal
description: "DataFrame.isLocal method in PySpark: Returns True if the collect and take methods can be run locally (without any Spark executors)."
canonical_url: https://docs.databricks.com/gcp/en/pyspark/reference/classes/dataframe/isLocal
---

# isLocal

Returns `True` if the `collect` and `take` methods can be run locally (without any Spark executors).

## Syntax

```
isLocal()
```

## Returns

bool

## Examples

```python
df = spark.sql("SHOW TABLES")
df.isLocal()
# True
```
