1a
The variable spark is the session. Print it, spark.version, spark.sparkContext.appName and spark.sparkContext.master, each on its own line, with a label in front of the last three.
Hint 1
The slide Developing in PySpark says why spark exists before your first cell runs.
Check your output
<pyspark.sql.session.SparkSession object at 0x...>
Spark version : 3.5.x
application : <name of the application>
master : <master>The address, the application name and the master vary with the environment. Read the master : does it start with local?
Show solutionHide solution
print(spark)
print("Spark version :", spark.version)
print("application :", spark.sparkContext.appName)
print("master :", spark.sparkContext.master)