Skip to content

Conversation

MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli commented Mar 18, 2025

ref #1168

These are all cases where kwargs / args just exist for compatibility with numpy

Exceptions are:

@MarcoGorelli MarcoGorelli marked this pull request as ready for review March 18, 2025 10:43
Comment on lines -1513 to 1540
) -> Series: ...
@overload
def mode(
self,
axis: Axis = ...,
skipna: _bool = ...,
numeric_only: _bool = ...,
*,
level: Level,
**kwargs,
) -> Self: ...
@overload
def mode(
self,
axis: Axis = ...,
skipna: _bool = ...,
level: None = ...,
numeric_only: _bool = ...,
**kwargs,
dropna: _bool = ...,
) -> Series: ...
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skipna and level aren't valid arguments to DataFrame.mode https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.mode.html

these may have been taken from a really old pandas version?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

skipna and level aren't valid arguments to DataFrame.mode https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.mode.html

these may have been taken from a really old pandas version?

the original stubs created by Microsoft were based on pandas 1.3 (or maybe earlier). So there is still a lot of stuff remaining from that version that never got cleaned up. Including updates to pandas beyond that.

Copy link
Collaborator

@Dr-Irv Dr-Irv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @MarcoGorelli

@Dr-Irv Dr-Irv merged commit 0abb350 into pandas-dev:main Mar 18, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants