Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL: fix type conversion for Timestamp object typed columns (GH9085) #9109

Merged

Conversation

jorisvandenbossche
Copy link
Member

Closes #9085

@jorisvandenbossche jorisvandenbossche added the IO SQL to_sql, read_sql, read_sql_query label Dec 19, 2014
@jorisvandenbossche jorisvandenbossche added this to the 0.16.0 milestone Dec 19, 2014
@jorisvandenbossche
Copy link
Member Author

@artemyk should only be a very small change

@artemyk
Copy link
Contributor

artemyk commented Dec 19, 2014

Maybe you should add datetime64 to _SQL_TYPES also, so it works for legacy mode?

@jorisvandenbossche
Copy link
Member Author

In fallback mode, datetime64 is already converted to datetime (https://github.com/pydata/pandas/blob/v0.15.2/pandas/io/sql.py#L1351), so that should be ok

@artemyk
Copy link
Contributor

artemyk commented Dec 20, 2014

Oh right, that makes sense!

jorisvandenbossche added a commit that referenced this pull request Dec 20, 2014
SQL: fix type conversion for Timestamp object typed columns (GH9085)
@jorisvandenbossche jorisvandenbossche merged commit 3d52a93 into pandas-dev:master Dec 20, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
IO SQL to_sql, read_sql, read_sql_query
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: Timestamps in object column not written as DateTime data in to_sql
2 participants