-
-
Notifications
You must be signed in to change notification settings - Fork 19.3k
Closed as not planned
Labels
BugIO SQLto_sql, read_sql, read_sql_queryto_sql, read_sql, read_sql_queryNeeds InfoClarification about behavior needed to assess issueClarification about behavior needed to assess issueNeeds TriageIssue that has not been reviewed by a pandas team memberIssue that has not been reviewed by a pandas team memberStringsString extension data type and string dataString extension data type and string data
Description
Pandas version checks
-
I have checked that this issue has not already been reported.
-
I have confirmed this bug exists on the latest version of pandas.
-
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
import pandas as pd
# given an sqlalchemy query with a String column type
df = pd.read_sql(query.statement, query.session.bind)
# df.dtypes confirm dtype to be 'object'Issue Description
The method _get_dtype doesn't recognize strings, see code:
https://github.com/pandas-dev/pandas/blob/master/pandas/io/sql.py#L1363C9-L1363C19
Expected Behavior
it should recognize string as str
Installed Versions
Replace this line with the output of pd.show_versions()
Metadata
Metadata
Assignees
Labels
BugIO SQLto_sql, read_sql, read_sql_queryto_sql, read_sql, read_sql_queryNeeds InfoClarification about behavior needed to assess issueClarification about behavior needed to assess issueNeeds TriageIssue that has not been reviewed by a pandas team memberIssue that has not been reviewed by a pandas team memberStringsString extension data type and string dataString extension data type and string data