-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
problem writing DateTime data to sqlite with sql.write_frame #6561
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
Comments
@jorisvandenbossche is this an open issue? |
(Still seems to be a problem as of commit 657d255.) |
@lebedov I think you need to use |
Changing the last line of the code in the original post to
still results in an |
AFAICT this is a fundamental problem with sqlite3 itself. I would think that SQLAlchemy could/would convert the datetimes to an appropriate format, but maybe that is not correct, see here: http://www.sqlite.org/datatype3.html. I don't think this ever worked (the issue you pointed to simply closed the issue as wont' fix for an older version). |
Using the latest code with SQLAlchemy 0.9.4 seems to work (assuming that the type affinity of the name column is explicitly set to text):
|
@lebedov late answer, but the fact that you have to create the sql table yourself shouldn't be necessary. Just using |
Yes - that seems to work with the latest pandas code as of today. |
OK, thanks for checking! |
Although this problem was ostensibly solved, it still seems to affect the latest commit as of the present time; the following code throws an
InterfaceError
at thewrite_frame()
call; changing the dtype of the date column to something other than DateTime (e.g., by removing the parameterparse_dates=[1]
in the call toread_csv()
) circumvents the problem:The text was updated successfully, but these errors were encountered: