-
-
Notifications
You must be signed in to change notification settings - Fork 147
Open
Labels
Missing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations
Description
Describe the bug
To Reproduce
- Provide a minimal runnable
pandas
example that is not properly checked by the stubs. - Indicate which type checker you are using (
mypy
orpyright
). - Show the error message received from that type checker while checking your example.
from __future__ import annotations
import pandas as pd
from typing import reveal_type
s = pd.Series([1,2,3])
reveal_type(pd.NA - s)
print(type(pd.NA - s))
outputs
$ python t.py
Runtime type is 'Series'
<class 'pandas.core.series.Series'>
$ pyright t.py
/home/marcogorelli/pandas-stubs-dev/t.py
/home/marcogorelli/pandas-stubs-dev/t.py:7:13 - information: Type of "pd.NA - s" is "NAType"
0 errors, 0 warnings, 1 information
Note how the runtime type (Series
) doesn't match the type-checked one NAType
Please complete the following information:
- OS: [e.g. Windows, Linux, MacOS] linux (WSL2)
- OS Version [e.g. 22]
- python version 3.12.8
- version of type checker pyright 1.1.403
- version of installed
pandas-stubs
82d1a65
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
Missing-datanp.nan, pd.NaT, pd.NA, dropna, isnull, interpolatenp.nan, pd.NaT, pd.NA, dropna, isnull, interpolateNumeric OperationsArithmetic, Comparison, and Logical operationsArithmetic, Comparison, and Logical operations