pyspark.sql.DataFrame.cache

DataFrame.cache() → pyspark.sql.dataframe.DataFrame

Persists the DataFrame with the default storage level (MEMORY_AND_DISK).

Notes

The default storage level has changed to MEMORY_AND_DISK to match Scala in 2.0.