I'm getting a stream of tweets in JSON format using a Python notebook on Apache Spark on IBM Bluemix. I want to turn the JSON object into a dataframe. The closest thing i have found is:
json_obj = {"tweet": "hey man", "name": "Alan"} #mock example
tweetsDF = sqlContext.read.json("file path")
Now, I don't wanna load a file. I just wanna take that JSON variable and convert it into dataframe format. That way i can apply it to the tweets variable. Any idea how to do this? Thank you!