-
-
Notifications
You must be signed in to change notification settings - Fork 123
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
Mypy complains about slicing a DateTimeIndex #397
Comments
On second glance, this may be something where my code hasn't narrowed down the index type of |
I think you'll need a more complete example that can be tested by others. Having said that, I get the same error on this simple code with import pandas as pd
df = pd.DataFrame({"c1":[1,2,3,4], "c2":[10,20,30,40]}, index=["a", "b", "c" , "d"])
x = df.loc["b":"c", :] Seems like a long standing issue. See I'm going to close this given that it seems to be a known issue with |
reopening so we can track if mypy ever fixes the bug |
It seems that PEP 696 is going to be deferred indefinitely. I was thinking - given that now typeshed added |
I'm open to a PR that does this. Should probably add a comment that you're adding |
Shortened code:
Error:
I don't know yet whether this is a stubs issue or potentially a MyPy issue - could even be an issue with my code - I will investigate further
The text was updated successfully, but these errors were encountered: