Skip to content

API revert inference of resolution when parsing string in Timestamp? #50704

Closed
@MarcoGorelli

Description

@MarcoGorelli

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:

In [2]: Timestamp(np.datetime64('2000', 's')).unit
Out[2]: 's'

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

In [7]: Timestamp('2000').unit
Out[7]: 's'

, 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?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    DatetimeDatetime data dtype

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions