-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
API revert inference of resolution when parsing string in Timestamp? #50704
Comments
Is it the Timestamp object or the Series etc having non-nano dtype causing troubles? If we revert inference on strings, do we also revert support for strings that are out of bounds for nanos? Or do inference only on those cases? IIRC joris and i agreed a while back that the latter was undesirable. xref #49076 which might alleviate some of the changiness for the Timestamp object. (not a First Issue; I have a branch that stalled out) |
The example from the pyarrow CI where I noticed this, is the change of the return value of
I think both. Although I suppose the only aspect about the Timestamp object that might affect users is the |
I only noticed issues when it's part of a In [2]: ts = Timestamp('2000')
In [3]: ts.unit
Out[3]: 's'
In [4]: to_datetime([ts])
Out[4]: DatetimeIndex(['2000-01-01'], dtype='datetime64[ns]', freq=None) If the only issue with |
Ah, I was assuming that we would use the unit of the Timestamp object to determine the dtype when creating a Series or column. But if the above is not the case, then it's indeed only |
In the relevant cases (object dtype or sequence-without-dtype) we go through |
resolved in #49076 |
Should #49737 be reverted?
This was brought in the dev call yesterday. It's great that non-nanosecond support is coming along, but it's still not complete and there are still some bugs. Hence, it probably shouldn't happen by default yet, but rather should be opt-in.
Arguably:
counts as opt-in, because the user had to go through a
numpy
object which already had a set resolution. But perhaps it's not the case for, where users would have been used to receiving
'ns'
.This would be fine once non-nano support is complete, but currently would introduce bugs - e.g. of a fairly common operation I came across this week: #50656. I think @jorisvandenbossche also had an example of this breaking the arrow CI (though from a quick look I couldn't find it - could you please share it?)
The text was updated successfully, but these errors were encountered: