You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This one could take some work to fix, because we don't differentiate between pd.Series([1,2,3], dtype='Int64') and pd.Series([1,2,3], dtype=int) in the stubs. pd.Series([1,2,3], dtype='Int64').diff() remains a series of integers (with pd.NA as the missing value), whereas pd.Series([1,2,3], dtype=int) becomes a Series[float] because np.nan becomes the missing value.
It might be possible to introduce a class hierarchy of base class of AllInt with subclasses BaseInt and NullableInt and then we replace Series[int] with Series[AllInt] everywhere, modify Series.__new__() to return either Series[BaseInt] or Series[NullableInt] based on dtype and then in Series.diff() have overloads to return different results based on whether you had Series[BaseInt] or Series[NullableInt].
This would be a big change - would have to modify a lot of PYI files and tests.
Describe the bug
A clear and concise description of what the bug is.
To Reproduce
pandas
example that is not properly checked by the stubs.mypy
orpyright
).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: