Skip to content

Commit

Permalink
Merge pull request #588 from sfu-db/fix/clean_duplication
Browse files Browse the repository at this point in the history
fix(clean): remove unneeded replace in clean_dupl
  • Loading branch information
yxie66 authored Apr 20, 2021
2 parents 22a4321 + 51c02cd commit 46f724b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dataprep/clean/clean_duplication_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def _create_replace_calls(
for idx, cluster in enumerate(cluster_page):
cluster_repr = f"'{new_values[idx]}'"
if do_merge[idx]:
cluster_vals = [f"'{cluster_val}'" for cluster_val, _ in cluster]
cluster_vals = [f"'{val}'" for val, _ in cluster if f"'{val}'" != cluster_repr]
code = (
f"{df_name}[{col}] = {df_name}[{col}].replace"
f"([{', '.join(cluster_vals)}], {cluster_repr})"
Expand Down

0 comments on commit 46f724b

Please sign in to comment.