[issue43547] support ZIP files with zeroed out fields (e.g. for reproducible builds)

2021-03-20 Thread Robert Pollak
Change by Robert Pollak : -- nosy: +jondo ___ Python tracker <https://bugs.python.org/issue43547> ___ ___ Python-bugs-list mailing list Unsubscribe:

[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 patc

[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] =

[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 <https://bugs.pytho

[issue35145] sqlite3: "select *" should optionally sniff and autoconvert TEXT datetime fields

2018-11-06 Thread Robert Pollak
Robert Pollak added the comment: Here is now a reduced version of my real use case: 2017v2-reduced.db. The file was originally created with "Oracle DBConvert". This file contains a table without rows. I was wrong in my last comment: There's also no sniffing needed here, s

[issue35145] sqlite3: "select *" should optionally sniff and autoconvert TEXT datetime fields

2018-11-05 Thread Robert Pollak
Robert Pollak added the comment: Paul, the sniffing would be only active for people who explicitly add a connect() argument like detect_types=DETECT_DATETIME, which can have the appropriate warning in the docs. You can also extend the sniffing to all values, not just the first non-missing

[issue35145] sqlite3: "select *" should optionally sniff and autoconvert TEXT datetime fields

2018-11-05 Thread Robert Pollak
Robert Pollak added the comment: I have created the attached sqlite database file (with SQLiteStudio) for testing. I contains a table `t` with a TEXT column `x` and a DATETIME (according to SQLiteStudio) column `y`. The table contains a single row with the value `2018-11-05 12:20:30

[issue35145] sqlite3: "select *" should optionally sniff and autoconvert TEXT datetime fields

2018-11-04 Thread Robert Pollak
Robert Pollak added the comment: Stéphane, your example does not match my use case with unknown table structure. Does everyone agree that such a sniffing is out of scope for sqlite3? That's not what I'd call "batteries included" :-( -- title: sqlite3: "select *&quo

[issue35145] sqlite3: "select *" should optionally autoconvert TEXT datetime fields

2018-11-03 Thread Robert Pollak
Change by Robert Pollak : -- title: sqlite3: "select *" should autoconvert datetime fields -> sqlite3: "select *" should optionally autoconvert TEXT datetime fields ___ Python tracker <https://

[issue35145] sqlite3: "select *" should autoconvert datetime fields

2018-11-03 Thread Robert Pollak
Robert Pollak added the comment: Thank you, Paul, for your hints on sniffing. I have now asked at SqliteStudio for confirmation that they also do content sniffing to detect datetime text fields: https://github.com/pawelsalawa/sqlitestudio/issues/3449 . So in this issue I am suggesting

[issue35145] sqlite3: "select *" should autoconvert datetime fields

2018-11-02 Thread Robert Pollak
Robert Pollak added the comment: (In fact, I am currently taking the first non-missing entry of each text column and trying to dateutil.parser.parse it. If that works, I use pandas.to_datetime on the column.) -- ___ Python tracker <ht

[issue35145] sqlite3: "select *" should autoconvert datetime fields

2018-11-02 Thread Robert Pollak
New submission from Robert Pollak : Currently, fields are converted to datetime as described in https://docs.python.org/3/library/sqlite3.html#sqlite3.PARSE_COLNAMES : 'select x as "x [datetime]" from table' In my use case I don't know the names and locations of the datet