from pyspark import SparkContext
SparkContext.setSystemProperty('spark.driver.maxResultSize', '10g')
sc = SparkContext('local', 'App Name')
How to change SparkContext properties in Interactive PySpark session