From the course: Introduction to Spark SQL and DataFrames

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Set up a Jupyter notebook

Set up a Jupyter notebook

From the course: Introduction to Spark SQL and DataFrames

Start my 1-month free trial

Set up a Jupyter notebook

- [Instructor] All right, I have opened a terminal, and I've navigated to my working directory, which is just in my Spark SQL directory, I've created one called work. And I'll just list the files, showing it's empty right now. So now I'm going to run PySpark, this will start a Jupyter notebook for me. Now because the directory's empty, I don't have any notebooks here, so I'm going to create a new notebook, and I'm going to use Python3, and the first thing I want to do is load some data. Before I can start working the data, I need to do a little setup work. First thing I need to do is import the PySpark SQL package from pyspark.sql, I want to import the one thing that I needed for this example, is called SparkSession, so let's load that. Now I want to actually create a Spark context, and that's basically a pointer to a data structure that represents the cluster and allows me to send commands to the cluster and…

Contents