Pylance inference on pandera's Dataframe #1281
Unanswered
Cameronwood611
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a simple block of code where I use Pylance for static type checking.
Side note: I'm attempting to be "pydantic" here and not have to use the
Serieskey but I don't think there's anyway around it, please let me know if so.Here, I expect to have
Series[str]forcars.make, but I getSeries[Unknown]instead:I could try the following to get
Series[str]but now I'm not treating it like a DataFrame (so indexing by cars["make"] will show an error) :I understand that pandera isn't completely compatible with static type checkers yet but I did want to ask if there was anything I could do about this?
Beta Was this translation helpful? Give feedback.
All reactions