-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
Open
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsEnhancementIO SQLto_sql, read_sql, read_sql_queryto_sql, read_sql, read_sql_query
Description
pd.read_sql converts columns of type sqlalchemy.Numeric to floats as the below selection appears to suggest. This seems counter intuitive since in the NUMERIC and DECIMAL types are interchangeable. Also the NUMERIC type has an option asdecimal that defaults to true (http://docs.sqlalchemy.org/en/latest/core/type_basics.html#sqlalchemy.types.Numeric). I would expect that sqlalchemy.Numeric types get converted to decimal.Decimal.
https://github.com/pandas-dev/pandas/blob/master/pandas/io/sql.py#L1187-L1190
j-negro
Metadata
Metadata
Assignees
Labels
Dtype ConversionsUnexpected or buggy dtype conversionsUnexpected or buggy dtype conversionsEnhancementIO SQLto_sql, read_sql, read_sql_queryto_sql, read_sql, read_sql_query