I was running
pd.concat(dfs, axis="rows")
pd.median(dfs, axis="rows")
basically any function from pandas which can accept axis and mypy will raise:
error: No overload variant of "concat" matches argument types "list[DataFrame]", "str" [call-overload]
note: Possible overload variants:
... # Long list of possibilies
How to remove this mypy error on this valid code ?
Pandas does not define for the typing overloads for the keyword "rows": For example for the concat method, only the following are allowed.
Using "index" instead of "rows" fix the problem.
Just a note:
pandas defines a Axis type in which "rows" would be a valid option, so this is most likely a bug on their side: