trino-python-client returns dtype string for datetime/timestamp fields
See original GitHub issuepresto-client returns data type of string for a timestamp field. Setup:
- PrestoSQL 333
- PostgreSQL 12.1
- presto-client 0.300.0
Tested:
- Using the PrestoSQL JDBC driver, the field is returned as a Java timestamp.
- Using
psycopg2
driver with SQLalchemy directly to Postgres, the field is returned as a python datetime object or pandas timestamp object. - Using presto-client 0.300, the field is returned as a string.
Expectation:
The field should be returned as a python datetime object or pandas timestamp object, akin to the PostgreSQL driver.
Note:
The issue has also been reported for pyhive (no longer under current development). I have not tested PrestoDB’s version to see if the other team has also worked on the topic.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
trino-python-client returns dtype string for datetime/timestamp ...
Using psycopg2 driver with SQLalchemy directly to Postgres, the field is returned as a python datetime object or pandas timestamp object. Using presto-client ......
Read more >Converting between datetime, Timestamp and datetime64
It returns long because for numpy.datetime64 type .astype(datetime) is equivalent to .astype(object) that returns Python integer ( long ) on numpy-1.8 .
Read more >How to convert a timestamp to string in pandas?
This convert the stamps datetime column to a string with format dd/mm/yyyy – note that after formatting with strftime, the Series / column...
Read more >Time series / date functionality — pandas 1.5.2 documentation
If you pass a single string to to_datetime , it returns a single Timestamp . Timestamp can also accept string input, but it...
Read more >Saving memory with Pandas 1.3's new string dtype
Series , and every column in a pandas.DataFrame , have a dtype: the type of object stored inside it. By default, Pandas will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I think this issue can be closed as we merged #160.
I will take a look at the oracle one and come up with a plan!