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

Reduce/clean copy usage in Series, reshaping #16080

Merged

Conversation

mroeschke
Copy link
Contributor

@mroeschke mroeschke commented Jun 25, 2024

Description

  • Clean up copy usages in concat
  • Avoid always shallow copying in unstack
  • Don't extra copy pandas objects in the Series constructor

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@mroeschke mroeschke added Python Affects Python cuDF API. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Jun 25, 2024
@mroeschke mroeschke requested a review from a team as a code owner June 25, 2024 02:54
@mroeschke mroeschke requested review from bdice and Matt711 June 25, 2024 02:54
Comment on lines -318 to -322
elif isinstance(obj, pd.Series):
result = cudf.Series(
data=obj,
index=cudf.RangeIndex(len(obj)),
)
Copy link
Contributor

Choose a reason for hiding this comment

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

Was this dead-code? I think we error for this situation above no? Just confirming.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct, this is dead code. We validate the input is a cudf object before we get here

@mroeschke
Copy link
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit f1efa40 into rapidsai:branch-24.08 Jun 26, 2024
77 checks passed
@mroeschke mroeschke deleted the pref/copies/reshape/series branch June 26, 2024 17:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improvement / enhancement to an existing function non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants