Commit c196039a authored by 张彦钊's avatar 张彦钊

add

parent 50a6ea7b
...@@ -33,7 +33,7 @@ if __name__ == '__main__': ...@@ -33,7 +33,7 @@ if __name__ == '__main__':
"AND partition_date='20190926' limit 20" "AND partition_date='20190926' limit 20"
df = spark.sql(sql) df = spark.sql(sql)
# df.show(6) # df.show(6)
rdd = df.rdd.map(lambda x:(str(x[0]))).map(lambda x:(eval(x))).map(lambda x:(ctr(x))) rdd = df.rdd.map(lambda x:(eval(x[0]))).map(lambda x:(ctr(x[0])))
print(rdd.collect()) print(rdd.collect())
spark.createDataFrame(rdd).toDF("n").show(6) spark.createDataFrame(rdd).toDF("n").show(6)
......
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