📜  pyspark 数据帧 json 字符串 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:28.983000             🧑  作者: Mango

代码示例1
newJson = '{"Name":"something","Url":"https://stackoverflow.com","Author":"jangcy","BlogEntries":100,"Caller":"jangcy"}'
df = spark.read.json(sc.parallelize([newJson]))
df.show(truncate=False)