databricks.koalas.DataFrame.spark.checkpoint

spark.checkpoint(eager: bool = True) → ks.DataFrame

Returns a checkpointed version of this DataFrame.

Checkpointing can be used to truncate the logical plan of this DataFrame, which is especially useful in iterative algorithms where the plan may grow exponentially. It will be saved to files inside the checkpoint directory set with SparkContext.setCheckpointDir.

Parameters
eagerbool

Whether to checkpoint this DataFrame immediately

Returns
DataFrame

Examples

>>> kdf = ks.DataFrame({"a": ["a", "b", "c"]})
>>> kdf
   a
0  a
1  b
2  c
>>> new_kdf = kdf.spark.checkpoint()  
>>> new_kdf  
   a
0  a
1  b
2  c