Commit 87242b87 authored by Your Name's avatar Your Name

predict add sample id

parent 915a608b
......@@ -217,8 +217,8 @@ if __name__ == "__main__":
print(indices.take(1))
te_result_dataframe = spark.createDataFrame(indices.flatMap(lambda x: x.split(";")).map(lambda l: Row(sample_id=l.split(":")[0],ctcvr=l.split(":")[1])))
te_result_pandas_df = te_result_dataframe.toDF("sample_id","ctcvr")
te_result_pandas_df.toPandas().to_csv("/home/gmuser/esmm/nearby/pred.txt", header=True)
te_result_dataframe.show()
te_result_dataframe.toPandas().to_csv("/home/gmuser/esmm/nearby/pred.txt", header=True)
......
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