我在IBM Bluemix上的Apache Spark上使用Python笔记本获得了JSON格式的推文流.我想将JSON对象转换为数据帧.我发现最接近的是:
json_obj = {"tweet": "hey man", "name": "Alan"} #mock example
tweetsDF = sqlContext.read.json("file path")
现在,我不想加载文件.我只想把那个JSON变量转换成数据帧格式.这样我就可以将它应用于tweets变量.知道怎么做吗?谢谢!
python json dataframe apache-spark ibm-cloud
apache-spark ×1
dataframe ×1
ibm-cloud ×1
json ×1
python ×1