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.

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$@1c18cefa

An empty DataFrame with 1 column.

+---+
|  x|
+---+
+---+

null

The size of an empty DataFrame is 0 of course.

0

Write the empty DataFrame into a file.

null

An empty DataFrame with no rows or columns.

++
||
++
++

null

The size of an empty DataFrame is 0 of course.

0

Write the empty DataFrame into a file.

null

Add a Column into an Empty DataFrame

The resulting DataFrame is still empty but with one more column.

+---+---+
|  x|  y|
+---+---+
+---+---+

null