Skip to content
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

[BUG] Timestamp scalars losing sub-second data #15654

Closed
galipremsagar opened this issue May 5, 2024 · 0 comments · Fixed by #15655
Closed

[BUG] Timestamp scalars losing sub-second data #15654

galipremsagar opened this issue May 5, 2024 · 0 comments · Fixed by #15655
Assignees
Labels
bug Something isn't working cudf.pandas Issues specific to cudf.pandas

Comments

@galipremsagar
Copy link
Contributor

Steps/Code to reproduce bug

In [1]: import pandas as pd

In [2]: import cudf

In [3]: pd.Timestamp(123)
Out[3]: Timestamp('1970-01-01 00:00:00.000000123')

In [4]: s = pd.Timestamp(123)

In [5]: ser = cudf.Series(s)

In [6]: ser
Out[6]: 
0   1970-01-01 00:00:00.000000123
dtype: datetime64[ns]

In [7]: ser = cudf.Series([s])

In [8]: ser
Out[8]: 
0   1970-01-01
dtype: datetime64[us]

In [9]: pd.Series(s)
Out[9]: 
0   1970-01-01 00:00:00.000000123
dtype: datetime64[ns]

In [10]: pd.Series([s])
Out[10]: 
0   1970-01-01 00:00:00.000000123
dtype: datetime64[ns]

Expected behavior
Same as pandas

Environment overview (please complete the following information)

  • Environment location: [Bare-metal]
  • Method of cuDF install: [from source]
@galipremsagar galipremsagar added bug Something isn't working cudf.pandas Issues specific to cudf.pandas labels May 5, 2024
@galipremsagar galipremsagar added this to the cudf.pandas API coverage milestone May 5, 2024
@galipremsagar galipremsagar self-assigned this May 5, 2024
rapids-bot bot pushed a commit that referenced this issue May 7, 2024
)

Fixes: #15654 

This PR makes fixes such that sub-second timestamp data is not being dropped in column construction.

Forks out of #14534

Authors:
  - GALI PREM SAGAR (https://github.com/galipremsagar)

Approvers:
  - Matthew Roeschke (https://github.com/mroeschke)

URL: #15655
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cudf.pandas Issues specific to cudf.pandas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant