Commit 4a3717f3 authored by 张彦钊's avatar 张彦钊

add print

parent 06864b6d
......@@ -248,6 +248,8 @@ def get_predict_set(ucity_id,model,ccity_name,manufacturer,channel):
print(df.head(2))
df = model.transform(df,n=160000, processes=22)
df = pd.DataFrame(df)
print("after transform")
print(df.shape)
df["label"] = df[0].apply(lambda x: x.split(",")[0])
df["device_id"] = df[0].apply(lambda x: x.split(",")[1])
df["city_id"] = df[0].apply(lambda x: x.split(",")[2])
......@@ -259,8 +261,7 @@ def get_predict_set(ucity_id,model,ccity_name,manufacturer,channel):
df["data"] = df["seq"].str.cat(df["data"], sep=",")
df = df.drop([0, "seq"], axis=1)
print(df.head())
print("after transform")
print(df.shape)
print(df.loc[df["device_id"] == "358035085192742"].shape)
native_pre = df[df["label"] == "0"]
native_pre = native_pre.drop("label", axis=1)
......
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