Commit 0fe6bc5d authored by 张彦钊's avatar 张彦钊

修改字典生成方式

parent 308ee936
......@@ -56,7 +56,8 @@ def get_data():
unique_values.extend(list(df[i].unique()))
print(df.head(2))
value_map = {v: k for k, v in enumerate(unique_values)}
temp = list(range(1,len(unique_values)+1))
value_map = dict(zip(unique_values,temp))
df = df.drop("device_id", axis=1)
train = df[df["stat_date"] != validate_date+"stat_date"]
......
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