We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug ``
To Reproduce
pandas
mypy
pyright
import pandas as pd reveal_type(pd.Series([1,2,3]).shift()) # t.py:4: note: Revealed type is "pandas.core.series.Series[builtins.int]"
however, the result is actually Series['float']
Series['float']
It's not clear to me if/how pandas-stubs distinguishes ints and nullable ints #1110
Please complete the following information:
pandas-stubs
Additional context noticed looking into #1108
The text was updated successfully, but these errors were encountered:
This one might quite complex to type correctly?
shift(n)
'bool'
'object'
n
0
fill_value
freq
Sorry, something went wrong.
As I stated here: #1108 (comment) , I don't think we can do this because the value of freq and the underlying index could change the result.
I think we have to just return Series, since we can't infer the subtype.
Series
Successfully merging a pull request may close this issue.
Describe the bug
``
To Reproduce
pandas
example that is not properly checked by the stubs.mypy
orpyright
).however, the result is actually
Series['float']
It's not clear to me if/how pandas-stubs distinguishes ints and nullable ints #1110
Please complete the following information:
pandas-stubs
2.2.3.241126Additional context
noticed looking into #1108
The text was updated successfully, but these errors were encountered: