The following works:
import pandas as pd
df = pd.DataFrame({"x": [1, 2, 3]}, index=pd.Index(["a", "b", "c"]))
index = pd.Index(["b"])
df2 = df.loc[index]
print(df2)
but pylance 2021.5.3 reports for the line with the .loc:
No overloads for "__getitem__" match the provided arguments
Argument types: (Index[str])
PR to follow