Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-1458130 Minor documentation fix for Series.sort_values #1916

Merged

Conversation

sfc-gh-vbudati
Copy link
Contributor

  1. Which Jira issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Fixes SNOW-1458130

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
      • If this test skips Local Testing mode, I'm requesting review from @snowflakedb/local-testing
    • I am adding new logging messages
    • I am adding a new telemetry message
    • I am adding new credentials
    • I am adding a new dependency
    • If this is a new feature/behavior, I'm adding the Local Testing parity changes.
  3. Please describe how your code solves the related issue.

    Added missing parameter key to the respective column and also add details about how sorting works.

@sfc-gh-vbudati sfc-gh-vbudati requested a review from a team as a code owner July 16, 2024 17:37
@sfc-gh-vbudati sfc-gh-vbudati added documentation Improvements or additions to documentation NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md snowpark-pandas labels Jul 16, 2024
Copy link
Contributor

@sfc-gh-helmeleegy sfc-gh-helmeleegy left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@@ -390,7 +390,9 @@ Methods
| ``sort_index`` | P | | ``N`` if given the ``key`` param. ``N`` if |
| | | | ``axis == 1``, or MultiIndex. |
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
| ``sort_values`` | P | | ``N`` if given the ``key`` param or ``axis == 1`` |
| ``sort_values`` | P | ``key`` | ``N`` if given the ``key`` param or ``axis == 1``. |
| | | | Snowpark pandas currently uses stable sort when |
Copy link
Contributor

Choose a reason for hiding this comment

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

Some corrections:

  • "when sorting the index values" doesn't seem to apply since this is about DataFrame. Anyway, I would delete this fragment because it's redundant.
  • This description makes it sound like "stable sort" is an algorithm, but it's a description of an algorithm.
  • We should mention that Snowpark pandas ignores the kind parameter completely. We currently warn choice of sort algorithm 'quicksort' is ignored. sort kind must be 'stable' or None.

So I suggest something like

The ``kind`` paramater has no effect. Snowpark pandas always uses a stable sort algorithm, while pandas by default does not.

@@ -379,7 +379,8 @@ Methods
| ``sort_index`` | P | | ``N`` if given the ``key`` param, |
| | | | or MultiIndex |
+-----------------------------+---------------------------------+----------------------------------+----------------------------------------------------+
| ``sort_values`` | P | | ``N`` if given the ``key`` parameter |
| ``sort_values`` | P | ``key`` | Snowpark pandas currently uses stable sort when |
Copy link
Contributor

Choose a reason for hiding this comment

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

ditto

Copy link
Contributor

@sfc-gh-mvashishtha sfc-gh-mvashishtha left a comment

Choose a reason for hiding this comment

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

thank you!

@sfc-gh-vbudati sfc-gh-vbudati merged commit c62df81 into main Jul 18, 2024
34 checks passed
@sfc-gh-vbudati sfc-gh-vbudati deleted the vbudati/SNOW-1458130-add-details-to-series-sort-values branch July 18, 2024 17:54
@github-actions github-actions bot locked and limited conversation to collaborators Jul 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Improvements or additions to documentation NO-CHANGELOG-UPDATES This pull request does not need to update CHANGELOG.md snowpark-pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants