File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -330,7 +330,8 @@ def read(self) -> DataFrame:
330
330
# We cast here in case the user passed "category" in
331
331
# order to get the correct dtype.categories.dtype
332
332
# e.g. test_categorical_dtype_utf16
333
- new_dtype [key ] = StringDtype (na_value = np .nan )
333
+ sdt = StringDtype (na_value = np .nan )
334
+ new_dtype [key ] = sdt # type: ignore[assignment]
334
335
frame [key ] = frame [key ].astype (new_dtype [key ])
335
336
336
337
new_dtype .update (old_dtype )
Original file line number Diff line number Diff line change @@ -802,11 +802,11 @@ def test_bool_and_nan_to_int(all_parsers):
802
802
False
803
803
"""
804
804
msg = (
805
- "cannot safely convert passed user dtype of int64 for "
805
+ "cannot safely convert passed user dtype of int(64|32) for "
806
806
"<class 'numpy.bool'> dtyped data in column 0 due to NA values"
807
807
)
808
808
if parser .engine == "python" :
809
- msg = "Unable to convert column 0 to type int64 "
809
+ msg = "Unable to convert column 0 to type int(64|32) "
810
810
elif parser .engine == "pyarrow" :
811
811
msg = r"cannot convert NA to integer"
812
812
with pytest .raises (ValueError , match = msg ):
You can’t perform that action at this time.
0 commit comments