[issue35145] sqlite3: optionally autoconvert table_info's DATETIME fields

2019-07-25 Thread Robert Pollak


Robert Pollak  added the comment:

Sorry for not providing a pull request yet.

By the way, the "DB Browser for SQLite" (https://sqlitebrowser.org/) also 
interprets DATETIME fields correctly.

(Could someone please change the "Stage" of this issue to "needs patch"?)

--
versions: +Python 3.8 -Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35145] sqlite3: optionally autoconvert table_info's DATETIME fields

2019-02-14 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

Hi @jondo,

Of course you can submit a PR and we can help you with a review if we have time 
because we are volunteers and it's in function of our free time.

Have a nice day,

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35145] sqlite3: optionally autoconvert table_info's DATETIME fields

2018-11-25 Thread Robert Pollak


Robert Pollak  added the comment:

So my workaround is of course
```
table = pd.read_sql_query('select * from table', con)
column_type = pd.read_sql_query('PRAGMA table_info("table")', con)['type']
datetimes = table.columns[column_type == 'DATETIME']
table.loc[:, datetimes] = table.loc[:, datetimes].apply(pd.to_datetime)
```

I would be interested in creating a pull request for the 
`detect_types=CONVERT_DATETIME` argument that I described. Is there any chance 
to get that merged? I currently see 541 open cpython pull requests labeled 
"awaiting review" :-/

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35145] sqlite3: optionally autoconvert table_info's DATETIME fields

2018-11-18 Thread Robert Pollak


Change by Robert Pollak :


--
title: sqlite3: "select *" should optionally sniff and autoconvert TEXT 
datetime fields -> sqlite3: optionally autoconvert table_info's DATETIME fields

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com