-
-
Notifications
You must be signed in to change notification settings - Fork 154
Open
Labels
DataFrameDataFrame data structureDataFrame data structure
Description
Describe the bug
max and other aggregations are missing some overloads, like any has
pandas-stubs/pandas-stubs/core/frame.pyi
Lines 1998 to 2015 in 232b4a1
| @overload | |
| def any( | |
| self, | |
| *, | |
| axis: None, | |
| bool_only: _bool | None = ..., | |
| skipna: _bool = ..., | |
| **kwargs: Any, | |
| ) -> np.bool: ... | |
| @overload | |
| def any( | |
| self, | |
| *, | |
| axis: Axis = ..., | |
| bool_only: _bool | None = ..., | |
| skipna: _bool = ..., | |
| **kwargs: Any, | |
| ) -> Series[_bool]: ... |
pandas-stubs/pandas-stubs/core/frame.pyi
Lines 2333 to 2339 in 232b4a1
| def max( | |
| self, | |
| axis: Axis | None = ..., | |
| skipna: _bool | None = True, | |
| numeric_only: _bool = False, | |
| **kwargs: Any, | |
| ) -> Series: ... |
To Reproduce
df = pd.DataFrame({'a': [1,2,3], 'b': [4,5,6]})
print(df.max(axis=None))The stubs say this always returns Series, but actually, for axis=None, it returns a scalar
Please complete the following information:
- OS: [e.g. Windows, Linux, MacOS]
- OS Version [e.g. 22]
- python version
- version of type checker
- version of installed
pandas-stubs
Additional context
Add any other context about the problem here.
Metadata
Metadata
Assignees
Labels
DataFrameDataFrame data structureDataFrame data structure