bigquery-bigframes
Generates Python code using BigQuery DataFrames (BigFrames), the pandas/scikit-learn-style API over BigQuery. Use when writing BigFrames code or doing pandas-style dataframe/ML work against BigQuery (e.g. in a notebook). Don't use for SQL-first workflows or the google-cloud-bigquery client library — use bigquery-basics.
- License 许可
- MIT
- 最近更新
- 2026-10-08
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- bigquery-bigframes
- metadata
- { "category": "BigDataAndAnalytics" }
- description
- Generates Python code using BigQuery DataFrames (BigFrames), the pandas/scikit-learn-style API over BigQuery. Use when writing BigFrames code or doing pandas-style dataframe/ML work against BigQuery (e.g. in a notebook). Don't use for SQL-first workflows or the google-cloud-bigquery client library — use bigquery-basics.
03 SKILL.md 正文
BigFrames Development Standards
- Avoid
.to_pandas(): You MUST NOT use.to_pandas()to download the entire dataset into memory as this downloads all data to the client's memory, bypassing BigQuery's distributed computation and risking Out of Memory (OOM) errors. There are some exceptions:- An error message explicitly requests you to use
to_pandas() - You are going to visualize the data, and the visualization library does not accept BigFrames Dataframe/Series instances. In this case, reduce the amount of data you are going to download before calling
.to_pandas()
- An error message explicitly requests you to use
- Avoid
read_gbq()for SQL: Do not write SQL queries and execute them withread_gbq()to maintain the Pandas-like DataFrame abstraction and allow lazy executions. Use BigFrames Dataframe/Series methods instead. - Use BigFrames ML package for Machine Learning Tasks: Do not use
Scikit-learn or other ML libraries with BigFrames dataframes because
standard Scikit-learn models require bringing data into local client memory,
whereas bigframes.ml delegates training directly to BigQuery's scalable ML
engine. Import your tools/classes from
bigframes.ml. - Stay in the Cloud: Perform data cleaning, transformation, and analysis via BigFrames methods to leverage BigQuery's scale.
- Accessors over UDFs/Lambdas:
- Prefer built-in accessors (e.g.,
df.col.str.*,df.col.dt.*) over remote UDFs. - Do not use lambdas with
Series.map()orDataFrame.apply().
- Prefer built-in accessors (e.g.,
- Schema Verification: Do not assume schema of intermediate outputs. Check
.dtypesafter loading, and usedisplay()with.head()or.peek(). - Visualization: BigFrames Dataframe mostly works directly with
Matplotlib, Seaborn, and other plotting libraries. If your attempt didn't
work, try using the
plotaccessor. If that didn't work either, you MUST sample or aggregate your data to make it small enough before callingto_pandas().
Model Development
- Unlike Scikit-learn: BigFrames'
predict()method always returns a DataFrame containing both predictions and features (not just a series of predictions). - No
random_state: Do not pass arandom_stateargument when instantiating BigFrames ML models, because this parameter is not supported in the BigFrames ML package. - Automatic Scaling: Do not use
OneHotEncoderorStandardScalerunless explicitly requested (handled automatically). - Hyperparameter Tuning: You must write custom loops (BigFrames lacks
GridSearchCVorRandomizedSearchCV). - ARIMA Plus (Forecasting):
- Import from
bigframes.ml.forecasting. - Sort data chronologically and split around a timepoint before training.
- Prediction horizon must be less than or equal to training horizon.
- Import from
- PCA: BigFrames' PCA class lacks simple
transform()method. Usepredict()instead. - Model Persistence: To persist a model, use
model.to_gbq(). To load a persisted model, usebpd.read_gbq_model().
04 同仓库更多 Skills
zkrouter
Self-hosted OpenAI-compatible LLM router — smart tier-based routing, ZK-stamped routing decisions, mode overrides, free OpenRouter at install via the Birth bot. Save 60-80% on inference costs by routing to the cheapest capable model across 12+ OpenRouter models.
zk
For custom ZK Solana programs and privacy-preserving applications to prevent double spending. Guide to integrate rent-free nullifier PDAs for double-spend prevention.
zk-omni-messaging
Zero-knowledge omnichain messaging between Robinhood Chain and Solana using CheshireZkOmniMessenger (msgType 4) with nullifier anti-replay and the zk-omni-relayer service.
zerion-wallet-data
Use when the user asks to check a wallet's portfolio, token balances, DeFi positions, PnL, transaction history, or NFTs. Provides interpreted on-chain data across 40+ EVM chains and Solana via x402 pay-per-request or API key — no raw RPC decoding needed.
youtube-clipper
YouTube 视频智能剪辑工具。下载视频和字幕,AI 分析生成精细章节(几分钟级别), 用户选择片段后自动剪辑、翻译字幕为中英双语、烧录字幕到视频,并生成总结文案。 使用场景:当用户需要剪辑 YouTube 视频、生成短视频片段、制作双语字幕版本时。 关键词:视频剪辑、YouTube、字幕翻译、双语字幕、视频下载、clip video
yield-optimization
Multi-chain yield optimization via yield.xyz (StakeKit). Discover 2,988+ yield opportunities across 75+ blockchains, build deposit/withdrawal transactions with shell scripts, and sign them with a MoonPay wallet. Use when the user wants to earn yield, find the best lending or staking rate, enter/exit a position, or check portfolio balances.