from pyspark.sql import SparkSession spark = SparkSession .builder .appName("Python Spark K-means example") .config("spark.some.config.option", "some-value") .getOrCreate()