In DataFrame.select_dtypes
type values like np.number
or np.datetime64
should be allowed
#887
Labels
Dtype Conversions
Unexpected or buggy dtype conversions
Describe the bug
The documentation of
DataFrame.select_dtypes
clearly states that it is allowed to use values likenp.number
ornp.datetime64
for theinclude
andexclude
parameters, but the current stubs don't allow it, they enforceinclude: _str | list[_str] | None
andexclude: _str | list[_str] | None
. This leads to typecheckers likemypy
reporting false positives on such calls.To Reproduce
If I run mypy on the following short snippet I get an error:
the error is:
Please complete the following information:
pandas-stubs
: 2.2.0.240218The text was updated successfully, but these errors were encountered: