Skip to content

fix: avoid copy argument warning in to_pandas#16917

Merged
tswast merged 3 commits intomainfrom
b508671576-copy-arg
May 5, 2026
Merged

fix: avoid copy argument warning in to_pandas#16917
tswast merged 3 commits intomainfrom
b508671576-copy-arg

Conversation

@tswast
Copy link
Copy Markdown
Contributor

@tswast tswast commented May 1, 2026

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes internal issue b/508671576 🦕

@tswast tswast requested review from a team as code owners May 1, 2026 20:17
@tswast tswast requested review from TrevorBergeron and removed request for a team May 1, 2026 20:17
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request removes the deprecated copy parameter from set_axis calls in blocks.py and dataframe.py. Feedback suggests that instead of using set_axis, which may still perform a copy in newer Pandas versions, the code should directly assign to the .columns attribute to ensure efficiency and avoid deprecation warnings.

Comment thread packages/bigframes/bigframes/core/blocks.py Outdated
Comment thread packages/bigframes/bigframes/dataframe.py Outdated
Comment thread packages/bigframes/bigframes/dataframe.py Outdated
@parthea
Copy link
Copy Markdown
Contributor

parthea commented May 4, 2026

Switching to draft until presubmits are green

@parthea parthea marked this pull request as draft May 4, 2026 15:01
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@tswast tswast marked this pull request as ready for review May 4, 2026 20:48
@tswast
Copy link
Copy Markdown
Contributor Author

tswast commented May 5, 2026

Failed tests:

FAILED tests/system/small/bigquery/test_ai.py::test_ai_if_multi_model - asser...
FAILED tests/system/small/bigquery/test_ai.py::test_ai_classify_multi_model

Appear to be unrelated to this change.

@tswast tswast merged commit fe5245b into main May 5, 2026
30 checks passed
@tswast tswast deleted the b508671576-copy-arg branch May 5, 2026 21:02
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.

3 participants