Lưu ý
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử đăng nhập hoặc thay đổi thư mục.
Cần có ủy quyền mới truy nhập được vào trang này. Bạn có thể thử thay đổi thư mục.
Marks the DataFrame as non-persistent, and remove all blocks for it from memory and disk.
Syntax
unpersist(blocking: bool = False)
Parameters
| Parameter | Type | Description |
|---|---|---|
blocking |
bool | Whether to block until all blocks are deleted. |
Returns
DataFrame: Unpersisted DataFrame.
Notes
blocking default has changed to False to match Scala in 2.0.
Cached data is shared across all Spark sessions on the cluster, so unpersisting it affects all sessions.
Examples
df = spark.range(1)
df.persist()
# DataFrame[id: bigint]
df.unpersist()
# DataFrame[id: bigint]
df = spark.range(1)
df.unpersist(True)
# DataFrame[id: bigint]