-
Notifications
You must be signed in to change notification settings - Fork 603
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
[10.0] fix: return pd.Timestamp
or pd.Series[datetime64]
for date.to_pandas()
#8784
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
from __future__ import annotations | ||
|
||
import datetime | ||
import pandas as pd | ||
|
||
from ibis.formats.pandas import PandasData | ||
|
||
|
||
class OraclePandasData(PandasData): | ||
@classmethod | ||
def convert_Timestamp_element(cls, dtype): | ||
return datetime.datetime.fromisoformat | ||
return pd.Timestamp.fromisoformat | ||
|
||
@classmethod | ||
def convert_Date_element(cls, dtype): | ||
return datetime.date.fromisoformat | ||
return pd.Timestamp.fromisoformat | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is sort of up for grabs given that pandas doesn't have a standard way to represent an array of dates (the I think it's fine to also change this to using pandas timestamps. |
||
|
||
@classmethod | ||
def convert_Time_element(cls, dtype): | ||
return datetime.time.fromisoformat | ||
return pd.Timestamp.fromisoformat |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think might want to keep this, but not 100% sure. In theory once you're in this function you shouldn't need to normalize ... in theory :)