Skip to content

fix: nameless column to_frame bug for pandas 3.0#17371

Open
shuoweil wants to merge 2 commits into
mainfrom
shuowei-fix-to-frame
Open

fix: nameless column to_frame bug for pandas 3.0#17371
shuoweil wants to merge 2 commits into
mainfrom
shuowei-fix-to-frame

Conversation

@shuoweil
Copy link
Copy Markdown
Contributor

@shuoweil shuoweil commented Jun 3, 2026

Fixes #<519726816> 🦕

@shuoweil shuoweil self-assigned this Jun 3, 2026
@shuoweil shuoweil requested review from a team as code owners June 3, 2026 23:35
@shuoweil shuoweil requested review from GarrettWu, TrevorBergeron and sycai and removed request for a team and sycai June 3, 2026 23:35
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 updates the to_frame method in series.py to handle missing or NaN column names more robustly, assigning 0 as the column name to align with Pandas behavior. The reviewer identified a potential runtime ValueError when provided_name is a tuple (e.g., a MultiIndex name), as pandas.isna would return an array with ambiguous truth value. A code suggestion was provided to wrap the name in a list to safely evaluate it.

Comment thread packages/bigframes/bigframes/series.py Outdated
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
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.

1 participant