Muistiinpano
Tämän sivun käyttö edellyttää valtuutusta. Voit yrittää kirjautua sisään tai vaihtaa hakemistoa.
Tämän sivun käyttö edellyttää valtuutusta. Voit yrittää vaihtaa hakemistoa.
Gets the DataFrame's current storage level.
Returns
StorageLevel
Examples
:::note Serverless compatibility
Databricks recommends moving away from df.cache() and df.persist() as they are not compatible with Databricks serverless compute architecture. Materialize intermediate results to Delta tables instead.
:::
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)