Commit 5f47c101 authored by 张彦钊's avatar 张彦钊

change transform

parent 65e93762
...@@ -113,6 +113,7 @@ def get_statistics(): ...@@ -113,6 +113,7 @@ def get_statistics():
for i in df.columns.difference(["device_id", "os","total"]): for i in df.columns.difference(["device_id", "os","total"]):
df[i] = df[i]/df["total"] df[i] = df[i]/df["total"]
df[i] = df[i].apply(lambda x: format(x,".4f")) df[i] = df[i].apply(lambda x: format(x,".4f"))
df[i] = df[i].astype("float")
df = df.drop("total", axis=1) df = df.drop("total", axis=1)
df["y"] = 1 df["y"] = 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