Can someone tell me the code for creating a dataframe in pyspark in python 2.6 and spark 2.0 -


sc = sparkcontext(appname="pythonsparkstreamingkafka_rm_01")
ssc = streamingcontext(sc, 120)

kafkastream = kafkautils.createstream(ssc, '112.10.1.1:2181', 'kafka-spark-streaming', {'kafkatopic':1})

after executing above code , need have code creating dataframe in pyspark


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -