diff --git a/normalize_linking.py b/normalize_linking.py index 3f219f5..946f266 100644 --- a/normalize_linking.py +++ b/normalize_linking.py @@ -83,7 +83,6 @@ def union(list1, list2): df["NEL-LIT"] = df["NEL-LIT"].str.split("|") df["NEL-METO"] = df["NEL-METO"].str.split("|") - df["NEL-LIT-UNION"] = ( df[["NEL-LIT", "NEL-METO"]].dropna().apply(lambda x: union(x[0], x[1]), axis=1) ) @@ -95,7 +94,7 @@ def union(list1, list2): df["NEL-METO"] = df["NEL-METO-UNION"].str.join("|") # remove intermediate results - df.drop(columns=['NEL-LIT-UNION', 'NEL-METO-UNION']) + df = df.drop(columns=["NEL-LIT-UNION", "NEL-METO-UNION"]) except KeyError: pass