Commit 2be148e6 authored by 赵威's avatar 赵威

rename

parent 566d56d6
...@@ -162,7 +162,7 @@ def device_tractae_fe(): ...@@ -162,7 +162,7 @@ def device_tractae_fe():
click_df.drop("partition_date", inplace=True, axis=1) click_df.drop("partition_date", inplace=True, axis=1)
exposure_df.drop("partition_date", inplace=True, axis=1) exposure_df.drop("partition_date", inplace=True, axis=1)
base_df = pd.merge(click_df, exposure_df, how="outer", indicator="Exist") base_df = pd.merge(click_df, exposure_df, how="outer", indicator="Exist")
base_df["label"] = np.where(base_df["Exist"] == "right_only", 0.5, 1.0) base_df["label"] = np.where(base_df["Exist"] == "right_only", 0.75, 1.0)
base_df.drop("Exist", inplace=True, axis=1) base_df.drop("Exist", inplace=True, axis=1)
# #
...@@ -247,8 +247,6 @@ def device_tractae_fe(): ...@@ -247,8 +247,6 @@ def device_tractae_fe():
# #
df = pd.merge(pd.merge(base_df, device_fe_df), tractate_fe_df) df = pd.merge(pd.merge(base_df, device_fe_df), tractate_fe_df)
# a = pd.merge(base_df, tractate_fe_df, how="left", left_on="card_id", right_on="card_id")
nullseries = df.isnull().sum() nullseries = df.isnull().sum()
nulls = nullseries[nullseries > 0] nulls = nullseries[nullseries > 0]
if nulls.any(): if nulls.any():
......
This diff is collapsed.
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