Closed
Description
Describe the bug
- @ operator on dataframe is not typehinted properly.
df.eval("...", inplace=True)
returns Unknown- Convert test for types into check/assert_type framework
To Reproduce
import pandas as pd
df1 = pd.DataFrame([[0, 1, -2, -1], [1, 1, 1, 1]])
df2 = pd.DataFrame([[0, 1], [1, 2], [-1, -1], [2, 0]])
check(assert_type(df1 @ df2, pd.DataFrame ),pd.DataFrame )
check(assert_type(df1.eval("c = 0 + 1", inplace=True), None), type(None))
Please complete the following information:
- OS: [e.g. Windows, Linux, MacOS] MacOS
- OS Version [e.g. 22] 15
- python version 3.12
- version of type checker 1.13
- version of installed
pandas-stubs
2.2.3.20241009