-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DataFrame.join Copy-on-Write optimization tests #52751
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
Conversation
Thanks for the PR @SecretLake! The CI caught some errors which I think you can solve locally if you run pre-commit. Let us know if you need help. |
Thanks for the feedback @noatamir. I don‘t see any errors in the CI. Could you pls point me to the failed runs? |
Oops. I thought I saw one earlier. My bad 🙈 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small comments, looks good generally
shares the same memory with original dataframes until it is edited. | ||
""" | ||
df1 = DataFrame({"key": ["a", "b", "c"], "a": [1, 2, 3]}) | ||
df2 = DataFrame({"key": ["a", "b", "c"], "b": [4, 5, 6]}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you define index=Index(["a", "b", "c"], name="key")
instead of using it as a column? We always try to create a test with the least number of operations possible
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, thank you for the review. Implemented changes based on the comments.
|
||
|
||
def test_join_on_key(using_copy_on_write): | ||
"""Test if DataFrame.join applies Copy-On-Write optimization. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you remove the comment? We generally don't add comments in tests
thx @SecretLake |
@phofl @noatamir @jorisvandenbossche @MarcoGorelli Could you guys please review this PR? Thanks again for the session today.