bigquery-bigframes

Generates Python code using BigQuery DataFrames for pandas-style analysis and ML on BigQuery.

Updated Jul 7, 2026
One-click install
npx skills add https://github.com/ricardolui/gcp-custom-agent-skills --skill bigquery-bigframes-ricardolui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: bigquery-bigframes
Source: https://github.com/ricardolui/gcp-custom-agent-skills/tree/main/bigquery-bigframes
Command: npx skills add https://github.com/ricardolui/gcp-custom-agent-skills --skill bigquery-bigframes-ricardolui

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Writing pandas-style data analysis and machine learning code against BigQuery often leads to mistakes like pulling entire datasets into local memory, using unsupported scikit-learn patterns, or writing raw SQL that breaks lazy execution. This Skill generates correct BigFrames (BigQuery DataFrames) code that keeps computation in BigQuery. ## Core Features & Use Cases - DataFrame API Best Practices: Generates BigFrames code with partial ordering mode, peek() previews, accessor-based transformations, and cloud-side processing instead of local materialization. - BigQuery ML Integration: Uses bigframes.bigquery.ml for training linear/logistic regression and other models directly in BigQuery, with reference examples for common ML tasks. - Pipeline & Notebook Readiness: Produces environment-agnostic setup code for BigQuery Studio, Colab Enterprise, and scheduled pipelines, including to_gbq() output materialization and headless validation guidance. - Use Case: A data scientist in a notebook wants to train a logistic regression model on a large BigQuery table without downloading data. The Skill generates BigFrames code that loads the table, cleans it, trains via bigframes.bigquery.ml, and writes predictions back to BigQuery. ## Quick Start Ask the AI to write BigFrames code that loads a BigQuery table, cleans it, and trains a linear regression model using bigframes.bigquery.ml.

Frequently Asked Questions about bigquery-bigframes

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I use pandas-style dataframes with BigQuery?

Use the BigFrames library by importing bigframes.pandas as bpd and setting bpd.options.bigquery.project and location. Enable partial ordering mode for faster processing, then use familiar DataFrame methods that execute as BigQuery jobs.

BigFrames vs google-cloud-bigquery client library: which should I use?

Use BigFrames for pandas-style DataFrame analysis and ML workflows where you want lazy, DataFrame-based execution. Use the google-cloud-bigquery client library for SQL-first workflows, job management, and administrative operations.

Can I use scikit-learn with BigQuery DataFrames?

No, standard scikit-learn requires loading data into local memory. Use bigframes.bigquery.ml instead, which delegates model training directly to BigQuery's ML engine and supports models like linear and logistic regression.

Why does head() fail in BigFrames partial ordering mode?

head(n) requires strict row ordering, which partial ordering mode relaxes for performance. Use peek(n) instead, which randomly samples n rows and runs significantly faster without ordering constraints.

When should I avoid calling to_pandas() in BigFrames?

Avoid to_pandas() for large datasets because it downloads all data to client memory, bypassing BigQuery's distributed computation and risking OOM errors. Only use it for small datasets, required visualizations, or when an error explicitly demands it.