Skip to content

Instantly share code, notes, and snippets.

@MrPowers
Last active April 4, 2016 15:50
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 MrPowers/b4135c0d9da9f601216f162bea07640e to your computer and use it in GitHub Desktop.
Save MrPowers/b4135c0d9da9f601216f162bea07640e to your computer and use it in GitHub Desktop.
Creating a Spark DataFrame
val df = sqlContext.read
.format("com.databricks.spark.csv")
.option("header", "true")
.option("inferSchema", "true")
.load(System.getProperty("user.home") + "/Desktop/cities.csv")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment