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 fix where df.rolling doesn't work with certain datetime64 index t… #55325

Closed
wants to merge 1 commit into from
Closed

Bug fix where df.rolling doesn't work with certain datetime64 index t… #55325

wants to merge 1 commit into from

Conversation

banorton
Copy link
Contributor

@banorton banorton commented Sep 29, 2023

This PR fixes an issue where in df.rolling, rolling._win_freq_i8 is always given in nanoseconds but rolling._index_array is given in the unit corresponding to the dtype (e.g. s, ms, us, ns). This causes a problem when the window is calculated if the dtype is not datetime64[ns]. This code returns the index array in nanoseconds so it matches with rolling._win_freq_i8.

@mroeschke
Copy link
Member

Thanks for the PR and the late triage in the old issue. We have a PR already in progress to fix this issue #55173 so going to close in favor of that PR.

@mroeschke mroeschke closed this Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: df.rolling does not work with 'datetime64[us]' index type
2 participants