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-1649172]: Fix loc set when setting DataFrame row with Series value #2213

Merged
merged 31 commits into from
Oct 7, 2024

Conversation

sfc-gh-rdurrani
Copy link
Contributor

@sfc-gh-rdurrani sfc-gh-rdurrani commented Sep 3, 2024

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

    Fixes SNOW-1649172

  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.

When doing df.loc[x] = series, an error occurs because series does not have the same number of columns as the dataframe being set. Instead, the Series should be transposed and set, regardless of whether it has an equal number of rows as the dataframe has columns.

@sfc-gh-rdurrani sfc-gh-rdurrani requested a review from a team as a code owner September 3, 2024 19:02
@sfc-gh-rdurrani sfc-gh-rdurrani added the NO-PANDAS-CHANGEDOC-UPDATES This PR does not update Snowpark pandas docs label Sep 3, 2024
@sfc-gh-rdurrani sfc-gh-rdurrani enabled auto-merge (squash) September 3, 2024 19:30
# Conflicts:
#	CHANGELOG.md
#	src/snowflake/snowpark/modin/pandas/series.py
#	tests/integ/modin/frame/test_loc.py
@sfc-gh-azhan
Copy link
Collaborator

sfc-gh-azhan commented Sep 19, 2024

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

    Fixes SNOW-1649172

  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.
    Please write a short description of how your code change solves the related issue.

Please describe what is the problem.

@sfc-gh-rdurrani sfc-gh-rdurrani enabled auto-merge (squash) September 19, 2024 21:41
Copy link
Collaborator

@sfc-gh-azhan sfc-gh-azhan left a comment

Choose a reason for hiding this comment

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

Please describe what was the issue?

tests/integ/modin/frame/test_iloc.py Outdated Show resolved Hide resolved
tests/integ/modin/frame/test_loc.py Outdated Show resolved Hide resolved
src/snowflake/snowpark/modin/pandas/indexing.py Outdated Show resolved Hide resolved
@sfc-gh-rdurrani
Copy link
Contributor Author

Will add additional tests once the match by position or labels issue is resolved: https://snowflake.slack.com/archives/C04HF38JFAQ/p1727828020400139?thread_ts=1727824503.275869&cid=C04HF38JFAQ

CHANGELOG.md Outdated Show resolved Hide resolved
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 for addressing the comments.

@sfc-gh-rdurrani sfc-gh-rdurrani merged commit 7df27f3 into main Oct 7, 2024
34 of 35 checks passed
@sfc-gh-rdurrani sfc-gh-rdurrani deleted the rdurrani-SNOW-1649172 branch October 7, 2024 21:47
@github-actions github-actions bot locked and limited conversation to collaborators Oct 7, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
NO-PANDAS-CHANGEDOC-UPDATES This PR does not update Snowpark pandas docs snowpark-pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants