from pyspark import SparkConf,SparkContext conf = SparkConf().setAppName("Spark Demo").setMaster("local") sc = SparkContext(conf=conf)