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

add test

parent f17a6da6
...@@ -162,7 +162,7 @@ def get_data(): ...@@ -162,7 +162,7 @@ def get_data():
print("esmm data ok") print("esmm data ok")
print(df.head(2)) print(df.head(2))
for i in range(12,36): for i in range(12,35):
df[i] = df[i].astype("str") df[i] = df[i].astype("str")
df["clevel1_id"] = df["clevel1_id"].astype("str") df["clevel1_id"] = df["clevel1_id"].astype("str")
df["y"] = df["y"].astype("str") df["y"] = df["y"].astype("str")
...@@ -175,7 +175,7 @@ def get_data(): ...@@ -175,7 +175,7 @@ def get_data():
for i in ["ucity_id","clevel1_id","ccity_name","device_type","manufacturer","channel"]: for i in ["ucity_id","clevel1_id","ccity_name","device_type","manufacturer","channel"]:
features = features + len(df[i].unique()) features = features + len(df[i].unique())
print("fields:{}".format(df.shape[1]-1)) print("fields:{}".format(df.shape[1]-1))
print("features:{}".format(features+48)) print("features:{}".format(features+46))
ccity_name = list(set(df["ccity_name"].values.tolist())) ccity_name = list(set(df["ccity_name"].values.tolist()))
ucity_id = list(set(df["ucity_id"].values.tolist())) ucity_id = list(set(df["ucity_id"].values.tolist()))
manufacturer = list(set(df["manufacturer"].values.tolist())) manufacturer = list(set(df["manufacturer"].values.tolist()))
......
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