-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
REGR: slicing an irregular DatetimeIndex with NaT fails with AssertionError #36953
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
Comments
Do you know in which version this still worked? |
In 1.0.x it still works, so regression in 1.1.x |
first bad commit: [4ac1e5f] CLN: assorted cleanups (#31938) where the assertion was added cc @jbrockmendel |
duplicate of #35509 so closing |
It might be the same underlying cause, it's a different use case, so reopening to ensure we also test this when fixing the bug. |
@jorisvandenbossche in that case, probably need to make the code sample more minimal and reproducible, i.e. remove the randomness or seed. |
But @simonjayhawkins thanks a lot for finding the cause! (seems just the assert that was added that we might be able to remove) |
The randomness doesn't matter really; I think I quite clearly described the case when this occurs: irregular (no freq) and NaT as last element? |
Updated the top post with some fixed numbers instead of the np.random.randn() |
This seems to be triggered in a very specific case, i.e. an irregular time series and a missing value as last element in the index:
The text was updated successfully, but these errors were encountered: