csv-detective 0.10.2.dev1__py3-none-any.whl → 0.10.2.dev3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- csv_detective/validate.py +10 -4
- {csv_detective-0.10.2.dev1.dist-info → csv_detective-0.10.2.dev3.dist-info}/METADATA +1 -1
- {csv_detective-0.10.2.dev1.dist-info → csv_detective-0.10.2.dev3.dist-info}/RECORD +7 -7
- {csv_detective-0.10.2.dev1.dist-info → csv_detective-0.10.2.dev3.dist-info}/WHEEL +0 -0
- {csv_detective-0.10.2.dev1.dist-info → csv_detective-0.10.2.dev3.dist-info}/entry_points.txt +0 -0
- {csv_detective-0.10.2.dev1.dist-info → csv_detective-0.10.2.dev3.dist-info}/licenses/LICENSE +0 -0
- {csv_detective-0.10.2.dev1.dist-info → csv_detective-0.10.2.dev3.dist-info}/top_level.txt +0 -0
csv_detective/validate.py
CHANGED
|
@@ -99,15 +99,21 @@ def validate(
|
|
|
99
99
|
chunk[col].value_counts(dropna=False),
|
|
100
100
|
fill_value=0,
|
|
101
101
|
)
|
|
102
|
-
for col_name,
|
|
102
|
+
for col_name, detected in previous_analysis["columns"].items():
|
|
103
103
|
if verbose:
|
|
104
|
-
logging.info(f"- Testing {col_name} for {
|
|
105
|
-
if
|
|
104
|
+
logging.info(f"- Testing {col_name} for {detected['format']}")
|
|
105
|
+
if detected["format"] == "string":
|
|
106
106
|
# no test for columns that have not been recognized as a specific format
|
|
107
107
|
continue
|
|
108
|
+
if detected["format"] not in formats:
|
|
109
|
+
if verbose:
|
|
110
|
+
logging.warning(
|
|
111
|
+
f"> Unknown format `{detected['format']}`, proceeding with full analysis"
|
|
112
|
+
)
|
|
113
|
+
return False, first_chunk, analysis, None
|
|
108
114
|
test_result: float = test_col_val(
|
|
109
115
|
serie=chunk[col_name],
|
|
110
|
-
format=formats[
|
|
116
|
+
format=formats[detected["format"]],
|
|
111
117
|
skipna=skipna,
|
|
112
118
|
)
|
|
113
119
|
if not bool(test_result):
|
|
@@ -3,7 +3,7 @@ csv_detective/cli.py,sha256=mu5anmBmaDk52_uZGiA4T37wYZCuV43gZAepjs1Cqzc,1389
|
|
|
3
3
|
csv_detective/explore_csv.py,sha256=qSf6N3tbp43BUMJF5wiXz3aYKaTez6ro-75KL2Arci4,7174
|
|
4
4
|
csv_detective/format.py,sha256=VglcxWBmjTvWNMhwSUZDfMdJcK9lAUum64Jxvm70AJ4,2898
|
|
5
5
|
csv_detective/utils.py,sha256=RJ_zFOJ1DRY8HtDrKPiCdNk5gU6-KwOrOKOyfSkBZZY,1118
|
|
6
|
-
csv_detective/validate.py,sha256=
|
|
6
|
+
csv_detective/validate.py,sha256=QBJhwHP0U0Ux7ODGV6foqNGm-DlbECIo6jUsBFOdDr0,5739
|
|
7
7
|
csv_detective/detection/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
csv_detective/detection/columns.py,sha256=_JtZHBr3aoEmSWh2xVe2ISnt-G7hpnA9vqlvcaGd0Go,2887
|
|
9
9
|
csv_detective/detection/encoding.py,sha256=KZ8W8BPfZAq9UiP5wgaeupYa5INU8KPz98E2L3XpX2Y,999
|
|
@@ -86,7 +86,7 @@ csv_detective/parsing/csv.py,sha256=5rw6gXZFQC1T4NT9CnW0AumidrYOkF8kjrfWGmk949I,
|
|
|
86
86
|
csv_detective/parsing/excel.py,sha256=tb65I78tdYlZci_tzvvQt8U6bZSYKjeVdn2CEvsET1o,6972
|
|
87
87
|
csv_detective/parsing/load.py,sha256=f-8aKiNpy_47qg4Lq-UZUR4NNrbJ_-KEGvcUQZ8cmb0,4317
|
|
88
88
|
csv_detective/parsing/text.py,sha256=yDAcop5xJQc25UtbZcV0guHXAZQfm-H8WuJORTy8Rr8,1734
|
|
89
|
-
csv_detective-0.10.2.
|
|
89
|
+
csv_detective-0.10.2.dev3.dist-info/licenses/LICENSE,sha256=A1dQrzxyxRHRih02KwibWj1khQyF7GeA6SqdOU87Gk4,1088
|
|
90
90
|
tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
91
91
|
tests/test_example.py,sha256=uTWswvUzBWEADGXZmMAdZvKhKvIjvT5zWOVVABgCDN4,1987
|
|
92
92
|
tests/test_fields.py,sha256=EuD2F1JUR8y88Hm-AYuJ5X7AKkGSyLIQfsGdxYgIWng,5680
|
|
@@ -104,8 +104,8 @@ tests/data/file.ods,sha256=4dR7zWptz5djALIBVeWHQ20GaZNfA63fevIJGFIk1_U,11832
|
|
|
104
104
|
tests/data/file.xls,sha256=QYmNX3FF0QfcQSzYQMtaMJaepJf5EZpDa1miKc4wMdQ,21495
|
|
105
105
|
tests/data/file.xlsx,sha256=naWzL02PK4pdIjMzfEyfSW9GQhkYYd_e7bpJvB8Pb2w,8314
|
|
106
106
|
tests/data/xlsx_file,sha256=NyOyN_rIe7ryJuHQLqjxVdKCc8V4s5pxyHl6wWFykCM,8305
|
|
107
|
-
csv_detective-0.10.2.
|
|
108
|
-
csv_detective-0.10.2.
|
|
109
|
-
csv_detective-0.10.2.
|
|
110
|
-
csv_detective-0.10.2.
|
|
111
|
-
csv_detective-0.10.2.
|
|
107
|
+
csv_detective-0.10.2.dev3.dist-info/METADATA,sha256=oP9yPoZyMCBJRc7fx_nGWlMQ9UmPKvFI1ht8vHlYb2U,11082
|
|
108
|
+
csv_detective-0.10.2.dev3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
109
|
+
csv_detective-0.10.2.dev3.dist-info/entry_points.txt,sha256=JjweTReFqKJmuvkegzlew2j3D5pZzfxvbEGOtGVGmaY,56
|
|
110
|
+
csv_detective-0.10.2.dev3.dist-info/top_level.txt,sha256=KDI4gyOpkmormGgUvSWrE3jen2e0unIsxR2b96DRvcw,25
|
|
111
|
+
csv_detective-0.10.2.dev3.dist-info/RECORD,,
|
|
File without changes
|
{csv_detective-0.10.2.dev1.dist-info → csv_detective-0.10.2.dev3.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{csv_detective-0.10.2.dev1.dist-info → csv_detective-0.10.2.dev3.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|