nxcals.api.extraction.data.builders.DataFrame.storageLevel
- property DataFrame.storageLevel: StorageLevel
Get the
DataFrame
’s current storage level.New in version 2.1.0.
Changed in version 3.4.0: Supports Spark Connect.
- Returns:
Currently defined storage level.
- Return type:
StorageLevel
Examples
>>> df1 = spark.range(10) >>> df1.storageLevel StorageLevel(False, False, False, False, 1) >>> df1.cache().storageLevel StorageLevel(True, True, False, True, 1)
>>> df2 = spark.range(5) >>> df2.persist(StorageLevel.DISK_ONLY_2).storageLevel StorageLevel(True, False, False, False, 2)