Skip to content

Instantly share code, notes, and snippets.

@fyyying
Created July 24, 2020 15:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fyyying/36f7acc12f13f3d68ab3d85f10c4c103 to your computer and use it in GitHub Desktop.
Save fyyying/36f7acc12f13f3d68ab3d85f10c4c103 to your computer and use it in GitHub Desktop.
# Create a small dataset with SparkContext
data = ["Owen", 22]
rdd = spark.sparkContext.parallelize(data)
df = spark.createDataFrame(rdd, ["name", "age"])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment