Commit 307eae4f authored by Your Name's avatar Your Name

dist test

parent 54922149
...@@ -298,5 +298,17 @@ if __name__ == "__main__": ...@@ -298,5 +298,17 @@ if __name__ == "__main__":
# print("耗时(秒):") # print("耗时(秒):")
# print((time.time()-b)) # print((time.time()-b))
print("hello"+ "*"*100) sentenceData = spark.createDataFrame([
(0.0, "I like Spark"),
(1.0, "Pandas is useful"),
(2.0, "They are coded by Python ")
], ["label", "sentence"])
print("rdd data")
sentenceData.select("label").show()
print("pandas data")
pandas_df = sentenceData.toPandas()
print(pandas_df)
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