Skip to content

Commit

Permalink
fix(clean): remove unneeded replace in clean_dupl
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonlockhart committed Apr 20, 2021
1 parent 22a4321 commit 51c02cd
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 51c02cd

Please sign in to comment.