Skip to content

BUG: Series([int], dtype="timedelta64[non-nano]") returns 0 result #52457

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

Open
3 tasks done
mroeschke opened this issue Apr 5, 2023 · 1 comment
Open
3 tasks done
Labels
Bug Non-Nano datetime64/timedelta64 with non-nanosecond resolution Timedelta Timedelta data type

Comments

@mroeschke
Copy link
Member

mroeschke commented Apr 5, 2023

Pandas version checks

  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • I have confirmed this bug exists on the main branch of pandas.

Reproducible Example

In [2]: pd.Series([3600], dtype="timedelta64[s]")
Out[2]: 
0   0 days
dtype: timedelta64[s]

In [3]: pd.Series([3600], dtype="timedelta64[s]")._values._ndarray
Out[3]: array([0], dtype='timedelta64[s]')

In [4]: pd.Series([3600], dtype="timedelta64[ns]")._values._ndarray
Out[4]: array([3600], dtype='timedelta64[ns]')

Issue Description

I would expect Out[3] to return array([3600], dtype='timedelta64[s]')

Expected Behavior

array([3600], dtype='timedelta64[s]')

Installed Versions

Replace this line with the output of pd.show_versions()

@mroeschke mroeschke added Bug Timedelta Timedelta data type Non-Nano datetime64/timedelta64 with non-nanosecond resolution labels Apr 5, 2023
@reddyrg1
Copy link
Contributor

reddyrg1 commented Apr 7, 2023

take

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Non-Nano datetime64/timedelta64 with non-nanosecond resolution Timedelta Timedelta data type
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants