5

If I try to validate code that uses pandas methodes with pylance in strict mode, I get a validation error.

import pandas as pd

ser: pd.Series[float] = pd.Series([.1, .2, .5, .3])
print(ser.max())

Pylance in strict mode returns the error:

Type of "max" is partially unknown

Am I doing something wrong? Can I avoid this error without switching pylance to basic mode?

AlexanderP
  • 161
  • 1
  • 8

1 Answers1

1

According to pyright documentation, one can turn off this specific check by creating pyrightconfig.json file in the same project folder with the next content:

{
    "reportUnknownMemberType":"none",
}

So you can be still in strict mode, but with one type of checks disabled.