Commit 5215db46 authored by 张彦钊's avatar 张彦钊

change test file

parent 933ca33f
......@@ -101,6 +101,9 @@ def get_predict(date,value_map,app_list_map):
print("native")
native_pre.toPandas().to_csv(local_path+"native.csv", header=True)
native_pre.repartition(1).write.csv(path+"native.csv", sep=',',header=True)
# 预测的tfrecord必须写成一个文件,这样可以摆保证顺序
spark.createDataFrame(rdd.filter(lambda x: x[4] == 0).map(lambda x: (x[0],x[5],x[6],x[7]))) \
.toDF("level2_ids","y","z","ids").repartition(1).write.format("tfrecords") \
.save(path=path+"native/", mode="overwrite")
......
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