Getting Started w/ Python, Spark, and Databricks

Revision as of 19:20, 2 August 2019 by Bpopp (talk | contribs)

Loading Data

Viewing Contents of a Parquet Folder

%fs ls /mnt/training/crime-data-20016

Reading Parquet

df = spark.read.parquet ( "/mnt/training/cimr-data-2016/Crime-Data-Boston-2016.parquet" )

Viewing Results

Text Based (Generic)

show(df)

Databricks Native Viewer

display(df)

Combining Dataframes

homicidesBostonDF = homicidesNewYorkDF.union ( homicidesBostonDF )