csv-detective 0.10.3.dev5__py3-none-any.whl → 0.10.3.dev6__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/detection/headers.py +1 -1
- csv_detective/parsing/load.py +2 -5
- {csv_detective-0.10.3.dev5.dist-info → csv_detective-0.10.3.dev6.dist-info}/METADATA +1 -1
- {csv_detective-0.10.3.dev5.dist-info → csv_detective-0.10.3.dev6.dist-info}/RECORD +8 -8
- {csv_detective-0.10.3.dev5.dist-info → csv_detective-0.10.3.dev6.dist-info}/WHEEL +0 -0
- {csv_detective-0.10.3.dev5.dist-info → csv_detective-0.10.3.dev6.dist-info}/entry_points.txt +0 -0
- {csv_detective-0.10.3.dev5.dist-info → csv_detective-0.10.3.dev6.dist-info}/licenses/LICENSE +0 -0
- {csv_detective-0.10.3.dev5.dist-info → csv_detective-0.10.3.dev6.dist-info}/top_level.txt +0 -0
csv_detective/parsing/load.py
CHANGED
|
@@ -46,9 +46,6 @@ def load_file(
|
|
|
46
46
|
)
|
|
47
47
|
if table.empty:
|
|
48
48
|
raise ValueError("Table seems to be empty")
|
|
49
|
-
header = table.columns.to_list()
|
|
50
|
-
if any(col.startswith("Unnamed") for col in header):
|
|
51
|
-
raise ValueError("Could not retrieve headers")
|
|
52
49
|
analysis = {
|
|
53
50
|
"engine": engine,
|
|
54
51
|
"sheet_name": sheet_name,
|
|
@@ -100,8 +97,8 @@ def load_file(
|
|
|
100
97
|
}
|
|
101
98
|
if engine is not None:
|
|
102
99
|
analysis["compression"] = engine
|
|
103
|
-
if any(col.startswith("Unnamed:") for col in table.columns):
|
|
104
|
-
raise ValueError("
|
|
100
|
+
if any(not isinstance(col, str) or col.startswith("Unnamed:") for col in table.columns):
|
|
101
|
+
raise ValueError("Could not accurately detect the file's columns")
|
|
105
102
|
analysis |= {
|
|
106
103
|
"header_row_idx": header_row_idx,
|
|
107
104
|
"header": list(table.columns),
|
|
@@ -9,7 +9,7 @@ csv_detective/detection/columns.py,sha256=_JtZHBr3aoEmSWh2xVe2ISnt-G7hpnA9vqlvca
|
|
|
9
9
|
csv_detective/detection/encoding.py,sha256=KZ8W8BPfZAq9UiP5wgaeupYa5INU8KPz98E2L3XpX2Y,999
|
|
10
10
|
csv_detective/detection/engine.py,sha256=wQeDKpp2DKF-HcS1R8H6GgQyaUgQme4szPtEHgAjBII,1552
|
|
11
11
|
csv_detective/detection/formats.py,sha256=9aIE4gwTN8c8pa-kofeJ7zalo8NqjGZabYD-G79kV5I,4734
|
|
12
|
-
csv_detective/detection/headers.py,sha256=
|
|
12
|
+
csv_detective/detection/headers.py,sha256=lnbWRxkI6rdyoWGtmxSfsPkqNjS0Nlpgw-pVevtmBP0,899
|
|
13
13
|
csv_detective/detection/rows.py,sha256=JQsmKP8-i8wzcZIWI_13LUer5mpYRIqaKg6qW01ZO3A,750
|
|
14
14
|
csv_detective/detection/separator.py,sha256=XjeDBqhiBxVfkCPJKem9BAgJqs_hOgQltc_pxrH_-Tg,1547
|
|
15
15
|
csv_detective/detection/variables.py,sha256=-QtZOB96z3pWbqnZ-c1RU3yzoYqcO61A0JzeS6JbkxY,3576
|
|
@@ -84,9 +84,9 @@ csv_detective/parsing/columns.py,sha256=H_dKHhSgQMIiOfxibnGl6HwTW9bRwGtIeUcYBN13
|
|
|
84
84
|
csv_detective/parsing/compression.py,sha256=Fnw5tj-PpBNI8NYsWj5gD-DUoWcVLnsVpiKm9MpxmIA,350
|
|
85
85
|
csv_detective/parsing/csv.py,sha256=5rw6gXZFQC1T4NT9CnW0AumidrYOkF8kjrfWGmk949I,1716
|
|
86
86
|
csv_detective/parsing/excel.py,sha256=pX6dbhAdAdbRpoGcrGsL1lSaF-fbzEb4WcvwcCGEgFw,6978
|
|
87
|
-
csv_detective/parsing/load.py,sha256=
|
|
87
|
+
csv_detective/parsing/load.py,sha256=1Fk43ikIOJwtWJUY-e8oNeNOk4MMtpmZV7s-VbQBS1k,4345
|
|
88
88
|
csv_detective/parsing/text.py,sha256=yDAcop5xJQc25UtbZcV0guHXAZQfm-H8WuJORTy8Rr8,1734
|
|
89
|
-
csv_detective-0.10.3.
|
|
89
|
+
csv_detective-0.10.3.dev6.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=DSI-ZXDcRt69iZArYZZAr_3OEb-qvwgOVBZxmYAKIkI,5918
|
|
@@ -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.3.
|
|
108
|
-
csv_detective-0.10.3.
|
|
109
|
-
csv_detective-0.10.3.
|
|
110
|
-
csv_detective-0.10.3.
|
|
111
|
-
csv_detective-0.10.3.
|
|
107
|
+
csv_detective-0.10.3.dev6.dist-info/METADATA,sha256=CRPkcMK634Pwprsj_g5IlFzVJiDXuDiXJipNv45ZKgY,11082
|
|
108
|
+
csv_detective-0.10.3.dev6.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
109
|
+
csv_detective-0.10.3.dev6.dist-info/entry_points.txt,sha256=JjweTReFqKJmuvkegzlew2j3D5pZzfxvbEGOtGVGmaY,56
|
|
110
|
+
csv_detective-0.10.3.dev6.dist-info/top_level.txt,sha256=KDI4gyOpkmormGgUvSWrE3jen2e0unIsxR2b96DRvcw,25
|
|
111
|
+
csv_detective-0.10.3.dev6.dist-info/RECORD,,
|
|
File without changes
|
{csv_detective-0.10.3.dev5.dist-info → csv_detective-0.10.3.dev6.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{csv_detective-0.10.3.dev5.dist-info → csv_detective-0.10.3.dev6.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|