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:
330330 # We cast here in case the user passed "category" in
331331 # order to get the correct dtype.categories.dtype
332332 # 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]
334335 frame [key ] = frame [key ].astype (new_dtype [key ])
335336
336337 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):
802802False
803803"""
804804 msg = (
805- "cannot safely convert passed user dtype of int64 for "
805+ "cannot safely convert passed user dtype of int(64|32) for "
806806 "<class 'numpy.bool'> dtyped data in column 0 due to NA values"
807807 )
808808 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) "
810810 elif parser .engine == "pyarrow" :
811811 msg = r"cannot convert NA to integer"
812812 with pytest .raises (ValueError , match = msg ):
You can’t perform that action at this time.
0 commit comments