Skip to content

Commit 1413d48

Browse files
authored
remove TypeError check
1 parent e2916d0 commit 1413d48

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

pandas/io/parsers/arrow_parser_wrapper.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -146,17 +146,12 @@ def handle_warning(invalid_row) -> str:
146146
column_types = {}
147147
for col, col_dtype in self.dtype.items():
148148
source_dtype = pandas_dtype(col_dtype)
149-
150-
try:
151-
target_dtype = to_pyarrow_type(source_dtype.type)
152-
if target_dtype:
153-
column_types[col] = target_dtype
154-
155-
except TypeError:
149+
target_dtype = to_pyarrow_type(source_dtype.type)
150+
if target_dtype:
151+
column_types[col] = target_dtype
156152
# TODO: Unsupported dtypes silently ignored - may cause
157153
# unexpected behavior when pyarrow applies default inference
158154
# instead of user's dtype
159-
pass
160155

161156
if column_types:
162157
self.convert_options["column_types"] = column_types

0 commit comments

Comments
 (0)