Commit 6e13e6c0 authored by Nic's avatar Nic
Browse files

black

parent b92583c0
......@@ -469,7 +469,7 @@ class DataFrameSchematizer:
_df = df[columns].astype(str)
dummy_col = UNIQUENESS_SEP.join(columns)
dummies.append(dummy_col) # to delete them later on
df[dummy_col] = _df.apply(UNIQUENESS_SEP.join, axis=1)
df[dummy_col] = _df.apply(UNIQUENESS_SEP.join, axis=1)
# =====================================================================
# second validation
......@@ -521,9 +521,9 @@ def _validate(document, validator, check_types=None, report=None):
col, row, *rows = error.absolute_path
except ValueError:
if error.absolute_schema_path[-1] == "uniqueItems":
non_uniques = {k for k, v in Counter(error.instance).items() if v>1}
non_uniques = {k for k, v in Counter(error.instance).items() if v > 1}
col = error.absolute_schema_path[-2]
row = ("?")
row = "?"
if len(non_uniques) > 1:
error.message = "values %s are not unique" % non_uniques
else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment