📜  类型对象“SparkContext”没有属性“_jsc” - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:04.639000             🧑  作者: Mango

代码示例1
import pyspark

conf = pyspark.SparkConf()
# conf.set('spark.app.name', app_name) # Optional configurations

# init & return
sc = pyspark.SparkContext.getOrCreate(conf=conf)
sqlcontext = SQLContext(sc)

df = sqlcontext.read.json('random.json')