Skip to content

Commit

Permalink
actually drop intermediate columns
Browse files Browse the repository at this point in the history
  • Loading branch information
aflueckiger committed Jun 4, 2020
1 parent 8fad114 commit 98eb7cb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions normalize_linking.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand All @@ -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
Expand Down

0 comments on commit 98eb7cb

Please sign in to comment.