Open
Description
See discussion in #397
Having said that, I get the same error on this simple code with mypy
, so it seems it is a mypy problem, as pyright
allows this:
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
python/mypy#2410
python/typeshed#8647
Originally posted by @Dr-Irv in #397 (comment)