Skip to content

BUG: astype of datetimelike to non-NS #19223

Closed
@xhochy

Description

@xhochy

The current pandas master includes a behaviour change date conversion.

Before #19176

In [1]: import pandas as pd

In [2]: pd.DataFrame({'x': [3, 2, 1]}).astype('M8[us]')
Out[2]:
                           x
0 1970-01-01 00:00:00.000003
1 1970-01-01 00:00:00.000002
2 1970-01-01 00:00:00.000001

After #19176

In [1]: import pandas as pd

In [2]: pd.DataFrame({'x': [3, 2, 1]}).astype('M8[us]')
Out[2]:
                              x
0 1970-01-01 00:00:00.000000003
1 1970-01-01 00:00:00.000000002
2 1970-01-01 00:00:00.000000001

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions