Closed
Description
Describe the bug
Using a "cross" join makes mypy throw a warning.
To Reproduce
Create a file example.py with following contents:
import pandas as pd
df1 = pd.DataFrame({"A":[1,2], "B": ["test", "test"]})
df2 = pd.DataFrame({"C":[2, 3], "D": ["test", "test"]})
df3 = df1.join(df2,how="cross")
print(df3)
Run mypy on it: "mypy example.py "
Output:
example.py:5: error: Argument "how" to "join" of "DataFrame" has incompatible type "Literal['cross']"; expected "Literal['left', 'right', 'outer', 'inner']" [arg-type]
Found 1 error in 1 file (checked 1 source file)
Expected output:
output with 0 errors
Please complete the following information:
- OS: MacOs
- OS Version: Sonoma 14.6
- python version: 3.11.10
- version of type checker: mypy 1.11.2
- version of installed
pandas-stubs
: 2.2.2.240603
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
No labels