File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed
Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -144,18 +144,6 @@ def _validate_file_details_and_update_format(resource: Resource) -> None:
144144 if not file_format :
145145 raise ValueError ("Unsupported file format" )
146146
147- supported_format = [file_format ]
148- if file_format .lower () == "csv" :
149- data = pd .read_csv (file .path , keep_default_na = False , encoding = "utf8" )
150- cols = data .columns
151- for vals in cols :
152- if vals == " " or vals == "Unnamed: 1" :
153- supported_format = []
154- break
155- elif not vals .isalnum ():
156- supported_format .pop ()
157- break
158-
159147 file_details .format = file_format
160148 file_details .save ()
161149
Original file line number Diff line number Diff line change 99 # "application/ms-doc": "DOC",
1010 "application/pdf" : "PDF" ,
1111 # "application/vnd.openxmlformats-officedocument.wordprocessingml.document": "DOCX",
12+ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" : "XLSX" ,
13+ "application/vnd.ms-excel" : "XLS" ,
1214 "application/xml" : "XML" ,
1315 "xml" : "XML" ,
1416 "text/xml" : "XML" ,
You can’t perform that action at this time.
0 commit comments