Skip to content

Closes #4782: add ascending argument to argsort - #4784

Merged
ajpotts merged 1 commit into
Bears-R-Us:mainfrom
ajpotts:4782_add_ascending_and_na_position_arguments_to_argsort
Aug 29, 2025
Merged

ajpotts merged 1 commit into
Bears-R-Us:mainfrom
ajpotts:4782_add_ascending_and_na_position_arguments_to_argsort

Conversation

@ajpotts

@ajpotts ajpotts commented Aug 14, 2025 •

Copy link
Copy Markdown
Contributor

Closes #4782: add ascending argument to argsort

@ajpotts
ajpotts force-pushed the 4782_add_ascending_and_na_position_arguments_to_argsort branch from 70908af to f48d4d9 Compare August 14, 2025 23:18
@ajpotts
ajpotts marked this pull request as ready for review August 15, 2025 14:34

@drculhane drculhane left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Two questions:

(1) Is this aligning to a standard parameter set somewhere? I don't see an na_position in either numpy or pandas.
(Oh, I think I see. This is relevant to ExtensionArrays, and I'm also looking at that PR now.)
(2) Should there be unit tests for the na_position parameter?

@ajpotts

ajpotts commented Aug 18, 2025

Copy link
Copy Markdown
Contributor Author

You bring up a good point. The na_position is used for pandas. However, now that we're changing how pandas it might be better to leave it out and let the pandas module handle it instead. For example, it's used by functions like this: https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.sort_index.html

@ajpotts
ajpotts force-pushed the 4782_add_ascending_and_na_position_arguments_to_argsort branch from f48d4d9 to 4febf0c Compare August 20, 2025 18:21
@ajpotts
ajpotts force-pushed the 4782_add_ascending_and_na_position_arguments_to_argsort branch from 4febf0c to f147b7c Compare August 20, 2025 18:32
@ajpotts
ajpotts requested a review from drculhane August 20, 2025 18:32
@ajpotts

ajpotts commented Aug 20, 2025

Copy link
Copy Markdown
Contributor Author

I removed the na_position argument from this PR as we determined it fit better in pandas module.

@drculhane drculhane left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'd suggest changing the title, since you've dropped na_position, but other than that, I think this is fine work.

@ajpotts ajpotts changed the title Closes #4782: add ascending and na_position arguments to argsort Closes #4782: add ascending argument to argsort Aug 26, 2025

@1RyanK 1RyanK left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good!

@jaketrookman jaketrookman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good

@ajpotts
ajpotts added this pull request to the merge queue Aug 29, 2025
Merged via the queue into Bears-R-Us:main with commit f6f6202 Aug 29, 2025
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.

add ascending argument to argsort

4 participants