Commit ea7bcd8a authored by 高雅喆's avatar 高雅喆

update

parent e53a2b3f
......@@ -101,12 +101,4 @@ print(result.count())
print(result.take(10))
df = spark.createDataFrame(result).na.drop().toDF("device", "search_words", "user_portrait").na.drop().toPandas()
df.to_csv("~/test_df.csv", index=False)
# path = "hdfs:///strategy/esmm/"
# spark.createDataFrame(result1).toDF("device", "search_words", "user_portrait").repartition(1).write.format("csv").save(path=path + "portrait/", mode="overwrite")
# result.saveAsTextFile("~/test_df.csv")
# df = result.toDF()
# df.show()
# result.write.format('csv').save("~/test_df.csv")
spark.stop()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment