Commit bee3dbb8 authored by 赵威's avatar 赵威

update null printer

parent 98d4166e
...@@ -144,10 +144,12 @@ def join_features(device_df, diary_df, cc_df): ...@@ -144,10 +144,12 @@ def join_features(device_df, diary_df, cc_df):
df["p2"] = df["projects"].apply(lambda x: nth_element(x, 1)) df["p2"] = df["projects"].apply(lambda x: nth_element(x, 1))
df["p3"] = df["projects"].apply(lambda x: nth_element(x, 2)) df["p3"] = df["projects"].apply(lambda x: nth_element(x, 2))
print("df:") print("joined df: " + str(df.shape))
nullseries = df.isnull().sum() nullseries = df.isnull().sum()
print(nullseries[nullseries > 0]) nulls = nullseries[nullseries > 0]
print(df.shape) if nulls.any():
print(nulls)
print("!!!!!!!!!!!!!!!!!!!!!!\n")
drop_columns = [ drop_columns = [
"cl_id", "first_demands_x", "first_demands_y", "first_demands", "second_demands_x", "second_demands_y", "second_demands", "cl_id", "first_demands_x", "first_demands_y", "first_demands", "second_demands_x", "second_demands_y", "second_demands",
......
...@@ -145,9 +145,12 @@ def join_features(device_df, tractate_df, cc_df): ...@@ -145,9 +145,12 @@ def join_features(device_df, tractate_df, cc_df):
df["p2"] = df["projects"].apply(lambda x: nth_element(x, 1)) df["p2"] = df["projects"].apply(lambda x: nth_element(x, 1))
df["p3"] = df["projects"].apply(lambda x: nth_element(x, 2)) df["p3"] = df["projects"].apply(lambda x: nth_element(x, 2))
print("df:") print("joined df: " + str(df.shape))
nullseries = df.isnull().sum() nullseries = df.isnull().sum()
print(nullseries[nullseries > 0]) nulls = nullseries[nullseries > 0]
if nulls.any():
print(nulls)
print("!!!!!!!!!!!!!!!!!!!!!!\n")
print(df.shape) print(df.shape)
drop_columns = [ drop_columns = [
......
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