csv-detective 0.10.3.dev1__py3-none-any.whl → 0.10.3.dev2__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/parsing/load.py +3 -1
- {csv_detective-0.10.3.dev1.dist-info → csv_detective-0.10.3.dev2.dist-info}/METADATA +1 -1
- {csv_detective-0.10.3.dev1.dist-info → csv_detective-0.10.3.dev2.dist-info}/RECORD +7 -7
- {csv_detective-0.10.3.dev1.dist-info → csv_detective-0.10.3.dev2.dist-info}/WHEEL +1 -1
- {csv_detective-0.10.3.dev1.dist-info → csv_detective-0.10.3.dev2.dist-info}/entry_points.txt +0 -0
- {csv_detective-0.10.3.dev1.dist-info → csv_detective-0.10.3.dev2.dist-info}/licenses/LICENSE +0 -0
- {csv_detective-0.10.3.dev1.dist-info → csv_detective-0.10.3.dev2.dist-info}/top_level.txt +0 -0
csv_detective/parsing/load.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import codecs
|
|
1
2
|
from io import BytesIO, StringIO
|
|
2
3
|
|
|
3
4
|
import pandas as pd
|
|
@@ -69,12 +70,13 @@ def load_file(
|
|
|
69
70
|
binary_file.seek(0)
|
|
70
71
|
# decoding and reading file
|
|
71
72
|
if is_url(file_path) or engine in COMPRESSION_ENGINES:
|
|
73
|
+
decoder = codecs.getincrementaldecoder(encoding)()
|
|
72
74
|
str_file = StringIO()
|
|
73
75
|
while True:
|
|
74
76
|
chunk = binary_file.read(1024**2)
|
|
75
77
|
if not chunk:
|
|
76
78
|
break
|
|
77
|
-
str_file.write(
|
|
79
|
+
str_file.write(decoder.decode(chunk))
|
|
78
80
|
del binary_file
|
|
79
81
|
str_file.seek(0)
|
|
80
82
|
else:
|
|
@@ -84,9 +84,9 @@ csv_detective/parsing/columns.py,sha256=rb5JywbKnYCT3Jb0ZaG1BnyPVtB3gy5mSD-K7qcO
|
|
|
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=tb65I78tdYlZci_tzvvQt8U6bZSYKjeVdn2CEvsET1o,6972
|
|
87
|
-
csv_detective/parsing/load.py,sha256=
|
|
87
|
+
csv_detective/parsing/load.py,sha256=orW6PV5XUsHA093yVSxXkJl33LEUUArr3hP81U9Bzd4,4386
|
|
88
88
|
csv_detective/parsing/text.py,sha256=yDAcop5xJQc25UtbZcV0guHXAZQfm-H8WuJORTy8Rr8,1734
|
|
89
|
-
csv_detective-0.10.3.
|
|
89
|
+
csv_detective-0.10.3.dev2.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.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.dev2.dist-info/METADATA,sha256=QhAD5N5OZx1L_9ajLLuEjhSYSz6q05eAEwVd6_kDPFc,11082
|
|
108
|
+
csv_detective-0.10.3.dev2.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
|
|
109
|
+
csv_detective-0.10.3.dev2.dist-info/entry_points.txt,sha256=JjweTReFqKJmuvkegzlew2j3D5pZzfxvbEGOtGVGmaY,56
|
|
110
|
+
csv_detective-0.10.3.dev2.dist-info/top_level.txt,sha256=KDI4gyOpkmormGgUvSWrE3jen2e0unIsxR2b96DRvcw,25
|
|
111
|
+
csv_detective-0.10.3.dev2.dist-info/RECORD,,
|
{csv_detective-0.10.3.dev1.dist-info → csv_detective-0.10.3.dev2.dist-info}/entry_points.txt
RENAMED
|
File without changes
|
{csv_detective-0.10.3.dev1.dist-info → csv_detective-0.10.3.dev2.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|