Skip to content

Commit

Permalink
Fix identation problem
Browse files Browse the repository at this point in the history
  • Loading branch information
argenisleon committed Nov 25, 2019
1 parent d4c2cc9 commit 3469aad
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions optimus/ml/keycollision.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ def fingerprint_cluster(df, input_cols, output: str = "dict"):
_row = list(row.asDict().values())
result[_row[3]] = {"similar": _row[1], "count": _row[2], "sum": _row[4]}

if output == "json":
result = dump_json(result)
if output == "json":
result = dump_json(result)
return result


Expand Down Expand Up @@ -137,6 +137,7 @@ def n_gram_fingerprint_cluster(df, input_cols, n_size=2, output: str = "dict"):
:param df: Dataframe to be processed
:param input_cols: Columns to be processed
:param n_size:
:param output:
:return:
"""
input_cols = parse_columns(df, input_cols)
Expand All @@ -152,7 +153,7 @@ def n_gram_fingerprint_cluster(df, input_cols, n_size=2, output: str = "dict"):
).repartition(1)

df = n_gram_fingerprint(df, input_col, n_size)
df.table()

count_col = name_col(input_col, COUNT_COL)
cluster_col = name_col(input_col, CLUSTER_COL)
recommended_col = name_col(input_col, RECOMMENDED_COL)
Expand All @@ -169,7 +170,7 @@ def n_gram_fingerprint_cluster(df, input_cols, n_size=2, output: str = "dict"):
_row = list(row.asDict().values())
result[_row[3]] = {"similar": _row[1], "count": _row[0], "sum": _row[2]}

if output == "json":
result = dump_json(result)
if output == "json":
result = dump_json(result)

return result
return result

0 comments on commit 3469aad

Please sign in to comment.