bigquery-bigframes

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

Updated May 11, 2026
One-click install
npx skills add https://github.com/alon3153/upe-social-publisher --skill bigquery-bigframes-alon3153
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: bigquery-bigframes
Source: https://github.com/alon3153/upe-social-publisher/tree/main/.agents/skills/bigquery-bigframes
Command: npx skills add https://github.com/alon3153/upe-social-publisher --skill bigquery-bigframes-alon3153

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires bigframes, and includes references (resource) components.

What problem does it solve? Writing pandas-style dataframe and machine learning code against BigQuery requires knowing BigFrames-specific APIs, ordering modes, and ML packages that differ from standard pandas and scikit-learn, and mistakes cause slow queries, local memory overload, or runtime errors. ## Core Features & Use Cases - Dataframe API Best Practices: Generates BigFrames code that stays in the cloud, uses partial ordering mode, previews data with peek(), and avoids local materialization via to_pandas(). - BigQuery ML Integration: Trains and evaluates models with bigframes.bigquery.ml (linear regression, logistic regression) so training runs on BigQuery's engine instead of local memory. - Legacy BigFrames ML Guidance: Handles bigframes.ml specifics such as DataFrame-returning predict(), no random_state, automatic scaling, ARIMA Plus forecasting, and model persistence with to_gbq(). - Use Case: Ask for a logistic regression model on the public penguins dataset and receive complete BigFrames code that loads data with read_gbq, trains via bbq.ml.create_model, and evaluates without downloading data locally. ## Quick Start Write BigFrames code that trains a linear regression model on the BigQuery public penguins dataset to predict penguin weight.

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 BigQuery DataFrames (BigFrames) by importing bigframes.pandas and setting bpd.options.bigquery.ordering_mode to 'partial'. DataFrame operations then translate into BigQuery jobs, keeping computation in the cloud instead of local memory.

How do I train a machine learning model with BigFrames?▼

Import functions from bigframes.bigquery.ml and call bbq.ml.create_model with a model_type such as LINEAR_REG or LOGISTIC_REG, passing training data with a renamed label column. Evaluate with bbq.ml.evaluate and predict with bbq.ml.predict.

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

Use BigFrames when you want a pandas or scikit-learn-style API for dataframe analysis and ML against BigQuery. Use the google-cloud-bigquery client library for SQL-first workflows, job management, and direct query execution.

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

head(n) requires strict row order, which partial ordering mode relaxes for performance. Use peek(n) instead, which randomly samples n rows and is significantly faster, or explicitly sort the DataFrame before calling head().

When should I avoid calling to_pandas() on a BigFrames DataFrame?▼

Avoid to_pandas() unless the dataset is small enough to fit in local memory or an error explicitly requires local materialization. It downloads all data to the client, bypassing BigQuery's distributed computation and risking out-of-memory errors.