René's URL Explorer Experiment


Title: `DataFrame.to_gbq` with `if_exists="replace"` and `clustering_columns` can swap data between columns if order is different · Issue #2502 · googleapis/python-bigquery-dataframes · GitHub

Open Graph Title: `DataFrame.to_gbq` with `if_exists="replace"` and `clustering_columns` can swap data between columns if order is different · Issue #2502 · googleapis/python-bigquery-dataframes

X Title: `DataFrame.to_gbq` with `if_exists="replace"` and `clustering_columns` can swap data between columns if order is different · Issue #2502 · googleapis/python-bigquery-dataframes

Description: Environment details Python: 3.12.10 (main, Apr 9 2025, 03:49:38) [Clang 20.1.0 ] bigframes==2.37.0 google-cloud-bigquery==3.40.1 pandas==3.0.1 pyarrow==23.0.1 Steps to reproduce Create a table with Dataframe.to_gbq with clustering_column...

Open Graph Description: Environment details Python: 3.12.10 (main, Apr 9 2025, 03:49:38) [Clang 20.1.0 ] bigframes==2.37.0 google-cloud-bigquery==3.40.1 pandas==3.0.1 pyarrow==23.0.1 Steps to reproduce Create a table with...

X Description: Environment details Python: 3.12.10 (main, Apr 9 2025, 03:49:38) [Clang 20.1.0 ] bigframes==2.37.0 google-cloud-bigquery==3.40.1 pandas==3.0.1 pyarrow==23.0.1 Steps to reproduce Create a table with...

Opengraph URL: https://github.com/googleapis/python-bigquery-dataframes/issues/2502

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"`DataFrame.to_gbq` with `if_exists=\"replace\"` and `clustering_columns` can swap data between columns if order is different","articleBody":"#### Environment details\n\n```\nPython: 3.12.10 (main, Apr  9 2025, 03:49:38) [Clang 20.1.0 ]\nbigframes==2.37.0\ngoogle-cloud-bigquery==3.40.1\npandas==3.0.1\npyarrow==23.0.1\n```\n\n#### Steps to reproduce\n\n  1. Create a table with `Dataframe.to_gbq` with `clustering_columns`\n  2. Reorder the clustering column and another column that has the same type \n  3. Write the updated dataframe to the same table with `if_exists=\"replace\"`\n  4. Inspect the table to see columns with different data than in dataframe\n\n#### Code example\n\n```python\nimport bigframes.pandas as bpd\nimport pandas as pd\n\nTABLE_ID = \"my_project.my_dataset.test_table\"\n\ndf = pd.DataFrame(\n    {\"a\": [10, 1, 2], \"b\": [\"Justin\", \"Alex\", \"Jim\"], \"c\": [\"cat\", \"dog\", \"cat\"]}\n)\nbdf = bpd.DataFrame(df)\n\n# First time writing, all good\nbdf.to_gbq(TABLE_ID, clustering_columns=[\"b\"])\n\n# Reorder the clustered column b and column c\nbdf = bdf[[\"a\", \"c\", \"b\"]]\n\n# When replacing and writing, the b and c columns are swapped\nbdf.to_gbq(TABLE_ID, if_exists=\"replace\", clustering_columns=[\"b\"])\n```\n\nWhile the dataframe looks good, the updated table now has columns b/c data swapped:\n\n\u003cimg width=\"500\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/ba5a77dc-d404-4590-bafc-b56ac165dc2b\" /\u003e\n\n\u003cimg width=\"500\" alt=\"Image\" src=\"https://github.com/user-attachments/assets/72119924-703c-490c-9a93-664f341a3c22\" /\u003e\n\nThis doesn't happen if `clustering_columns` is not used in my testing.","author":{"url":"https://github.com/jbandoro","@type":"Person","name":"jbandoro"},"datePublished":"2026-03-10T17:53:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/2502/python-bigquery-dataframes/issues/2502"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:59d1b9b7-1aa2-55ac-3bdf-9ba8b17b5832
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idE802:E1B7B:73AB8D:AA21B4:6A4E1490
html-safe-nonce4459d406a05a28c196b5f7c9e8d5cc922bf9d31a40179c96c35cd504715dca1a
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFODAyOkUxQjdCOjczQUI4RDpBQTIxQjQ6NkE0RTE0OTAiLCJ2aXNpdG9yX2lkIjoiNTMwNDE1MTg3MjA4NDI1MTc5MyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacdd81879e84e35e3eec233f3bce4a0ba39ec5fb28e5572a1759212ff94b970483
hovercard-subject-tagissue:4053317601
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/googleapis/python-bigquery-dataframes/2502/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3856ec162d288a3443cca37e4c7327510bb8274cc7c75c838bbbcbf8717bff34/googleapis/python-bigquery-dataframes/issues/2502
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3856ec162d288a3443cca37e4c7327510bb8274cc7c75c838bbbcbf8717bff34/googleapis/python-bigquery-dataframes/issues/2502
og:image:altEnvironment details Python: 3.12.10 (main, Apr 9 2025, 03:49:38) [Clang 20.1.0 ] bigframes==2.37.0 google-cloud-bigquery==3.40.1 pandas==3.0.1 pyarrow==23.0.1 Steps to reproduce Create a table with...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamejbandoro
hostnamegithub.com
expected-hostnamegithub.com
None030096ee0db095447bfe77409d33bfac127ca7128299c58deef27c52eaa1b1f0
turbo-cache-controlno-preview
go-importgithub.com/googleapis/python-bigquery-dataframes git https://github.com/googleapis/python-bigquery-dataframes.git
octolytics-dimension-user_id16785467
octolytics-dimension-user_logingoogleapis
octolytics-dimension-repository_id667598363
octolytics-dimension-repository_nwogoogleapis/python-bigquery-dataframes
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id667598363
octolytics-dimension-repository_network_root_nwogoogleapis/python-bigquery-dataframes
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseea9187571e3edc5f2780f750631138669441ca50
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/googleapis/python-bigquery-dataframes/issues/2502#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fpython-bigquery-dataframes%2Fissues%2F2502
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fgoogleapis%2Fpython-bigquery-dataframes%2Fissues%2F2502
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=googleapis%2Fpython-bigquery-dataframes
Reloadhttps://github.com/googleapis/python-bigquery-dataframes/issues/2502
Reloadhttps://github.com/googleapis/python-bigquery-dataframes/issues/2502
Reloadhttps://github.com/googleapis/python-bigquery-dataframes/issues/2502
Please reload this pagehttps://github.com/googleapis/python-bigquery-dataframes/issues/2502
googleapis https://github.com/googleapis
python-bigquery-dataframeshttps://github.com/googleapis/python-bigquery-dataframes
Notifications https://github.com/login?return_to=%2Fgoogleapis%2Fpython-bigquery-dataframes
Fork 68 https://github.com/login?return_to=%2Fgoogleapis%2Fpython-bigquery-dataframes
Star 289 https://github.com/login?return_to=%2Fgoogleapis%2Fpython-bigquery-dataframes
Code https://github.com/googleapis/python-bigquery-dataframes
Issues 0 https://github.com/googleapis/python-bigquery-dataframes/issues
Pull requests 0 https://github.com/googleapis/python-bigquery-dataframes/pulls
Actions https://github.com/googleapis/python-bigquery-dataframes/actions
Projects https://github.com/googleapis/python-bigquery-dataframes/projects
Security and quality 0 https://github.com/googleapis/python-bigquery-dataframes/security
Insights https://github.com/googleapis/python-bigquery-dataframes/pulse
Code https://github.com/googleapis/python-bigquery-dataframes
Issues https://github.com/googleapis/python-bigquery-dataframes/issues
Pull requests https://github.com/googleapis/python-bigquery-dataframes/pulls
Actions https://github.com/googleapis/python-bigquery-dataframes/actions
Projects https://github.com/googleapis/python-bigquery-dataframes/projects
Security and quality https://github.com/googleapis/python-bigquery-dataframes/security
Insights https://github.com/googleapis/python-bigquery-dataframes/pulse
#2532https://github.com/googleapis/python-bigquery-dataframes/pull/2532
DataFrame.to_gbq with if_exists="replace" and clustering_columns can swap data between columns if order is differenthttps://github.com/googleapis/python-bigquery-dataframes/issues/2502#top
#2532https://github.com/googleapis/python-bigquery-dataframes/pull/2532
https://github.com/chelsea-lin
https://github.com/jialuoo
api: bigqueryIssues related to the googleapis/python-bigquery-dataframes API.https://github.com/googleapis/python-bigquery-dataframes/issues?q=state%3Aopen%20label%3A%22api%3A%20bigquery%22
https://github.com/jbandoro
jbandorohttps://github.com/jbandoro
on Mar 10, 2026https://github.com/googleapis/python-bigquery-dataframes/issues/2502#issue-4053317601
https://private-user-images.githubusercontent.com/79104794/561108390-ba5a77dc-d404-4590-bafc-b56ac165dc2b.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODM1MDIyNjksIm5iZiI6MTc4MzUwMTk2OSwicGF0aCI6Ii83OTEwNDc5NC81NjExMDgzOTAtYmE1YTc3ZGMtZDQwNC00NTkwLWJhZmMtYjU2YWMxNjVkYzJiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzA4VDA5MTI0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU5NDY4MjBmMTIzYjA3ZmY5MDhlZjZiZmUyMmNiYjVjNDVmNDIwMTc4ZmIwODcxYTNlODNmYjg5NjU0ZWQ2YTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.ndUxWDWOQn1df185_hlN9HdaWYXEPmkl1vGcpV9uerc
https://private-user-images.githubusercontent.com/79104794/561108609-72119924-703c-490c-9a93-664f341a3c22.png?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3ODM1MDIyNjksIm5iZiI6MTc4MzUwMTk2OSwicGF0aCI6Ii83OTEwNDc5NC81NjExMDg2MDktNzIxMTk5MjQtNzAzYy00OTBjLTlhOTMtNjY0ZjM0MWEzYzIyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjA3MDglMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwNzA4VDA5MTI0OVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTZkYmZjOGU5N2YyNGRkODM2MjVjZmFjMmU4ZGE4MThlZDU5ZWI0N2E0ODFlYzljYzMwOGFkMTE2MmI1MjdlYWImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JnJlc3BvbnNlLWNvbnRlbnQtdHlwZT1pbWFnZSUyRnBuZyJ9.LW5Gar1DP3GAI_jmuOo_Fhz8Vm0fWh0tsQ5fQDDcwXU
chelsea-linhttps://github.com/chelsea-lin
jialuoohttps://github.com/jialuoo
api: bigqueryIssues related to the googleapis/python-bigquery-dataframes API.https://github.com/googleapis/python-bigquery-dataframes/issues?q=state%3Aopen%20label%3A%22api%3A%20bigquery%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.