Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pandas/io/parsers/arrow_parser_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,5 +223,10 @@ def read(self) -> DataFrame:
elif using_pyarrow_string_dtype():
frame = table.to_pandas(types_mapper=arrow_string_types_mapper())
else:
frame = table.to_pandas()
if self.kwds.get("dtype") is not None and issubclass(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you use isinstance instead of issubclass?

type(self.kwds.get("dtype")), dict
):
frame = table.to_pandas(types_mapper=self.kwds["dtype"].get)
else:
frame = table.to_pandas()
return self._finalize_pandas_output(frame)