Commit 41b6e5c0 authored by 张彦钊's avatar 张彦钊

add multi file

parent e4c1211e
...@@ -14,7 +14,9 @@ def test(): ...@@ -14,7 +14,9 @@ def test():
# ti.tidbMapDatabase("jerry_test") # ti.tidbMapDatabase("jerry_test")
data = [(0, 18.0), (1, 19.0), (2, 8.0), (3, 5.0), (4, 2.2), (5, 9.2), (6, 14.4)] data = [(0, 18.0), (1, 19.0), (2, 8.0), (3, 5.0), (4, 2.2), (5, 9.2), (6, 14.4)]
df = spark.createDataFrame(data, ["id", "hour"]).rdd.map(lambda x:x[0]).collect() df = spark.createDataFrame(data, ["id", "hour"])
df.show(6)
t = df.rdd.map(lambda x:x[0]).collect()
print(df) print(df)
# validate_date = spark.sql("select max(stat_date) from esmm_train_data").rdd.map(lambda x: str(x[0])) # validate_date = spark.sql("select max(stat_date) from esmm_train_data").rdd.map(lambda x: str(x[0]))
......
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