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

add test

parent ccf12cf3
...@@ -70,7 +70,7 @@ def sort_app(): ...@@ -70,7 +70,7 @@ def sort_app():
df["app_list"] = df["app_list"].apply(json_format) df["app_list"] = df["app_list"].apply(json_format)
n = df.shape[0] n = df.shape[0]
for i in category.keys(): for i in category.keys():
df[i] = df["app_list"].apply(lambda x: 1 if len(x & category[i]) > 0 else 0) df[i] = df["app_list"].apply(lambda x: 1 if len(x & category[i]) > 0 else 2)
# print(i) # print(i)
# print(df.loc[df[i]==1].shape[0]/n) # print(df.loc[df[i]==1].shape[0]/n)
df = df.drop("app_list",axis=1) df = df.drop("app_list",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