Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Coalesce and Repartition in Spark DataFrame

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

Loading...
Loading...
org.apache.spark.sql.SparkSession$implicits$@60ad5f12
+----+-------+
| age|   name|
+----+-------+
|null|Michael|
|  30|   Andy|
|  19| Justin|
+----+-------+

null

Get Number of Partitions

1

Repartition

[age: bigint, name: string]
4