pyspark.sql.DataFrame.isLocal

DataFrame.isLocal() → bool

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