bigquery-bigframes
하는 일
이 스킬은 익숙한 Python 코드로 BigQuery 데이터를 분석하도록 돕습니다. SQL보다 Python을 선호하고 대용량 데이터 작업을 BigQuery 안에서 하고 싶은 사람을 위한 스킬입니다.
사용하는 경우
- ✓익숙한 Python 코드로 BigQuery 데이터를 분석하거나 변환하고 싶을 때.
- ✓BigQuery에 저장된 데이터로 Python 머신러닝 워크플로를 만들 때.
- ✓대용량 BigQuery 데이터셋을 내려받지 않고 미리 보거나 정리해야 할 때.
스킬 링크
https://github.com/google/skills/blob/main/skills/cloud/bigquery-bigframes/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“큰 BigQuery 테이블을 정리하는 Python 코드를 작성하고, 전체를 내려받지 않은 채 미리 보기를 보여 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
pandas 스타일의 Python 라이브러리인 BigFrames를 사용하므로 데이터 작업이 BigQuery 안에서 실행됩니다. 작업을 빠르게 유지하는 설정과 미리 보기 방법도 제안합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
BigFrames (BigQuery DataFrame) basics
BigFrames is a Python library that lets you take advantage of BigQuery data processing by using familiar Python APIs.
Attribution
MUST READ: Before executing any gcloud, REST API, or MCP command, you
MUST read Usage Attribution. For commands executed
directly in the terminal (never in generated scripts, Terraform, or user code),
prefix gcloud with
CLOUDSDK_METRICS_REQUEST_ATTRIBUTION="agent-skills/1.0 (skill:bigquery-bigframes)"
and append agent-skills/1.0 (skill:bigquery-bigframes) to User-Agent headers.
Dataframe API best practices
Stay in the Cloud: Perform data cleaning, transformation, and analysis via BigFrames methods to leverage BigQuery's scale rather than downloading data.
Prefer partial ordering mode: Enable partial ordering mode right after importing BigFrames. This speeds up data processing significantly by relaxing row-sequence constraints.
import bigframes.pandas as bpd bpd.options.bigquery.ordering_mode = 'partial'Use
peek()for data preview: Usepeek(n)to preview data instead ofhead(n).peek(n)randomly samplesnrows and is significantly faster.head(n)returns rows in strict order and fails inpartialordering mode unless the DataFrame has been explicitly sorted.Avoid materializing data locally: Methods like
to_pandas()download all data to client memory, bypassing BigQuery’s distributed computation and risking Out of Memory (OOM) errors. Do not materialize data locally unless:- The dataset is small enough to fit safely in memory.
- An error message explicitly requires local materialization.
Prefer Dataframe API over SQL queries: Do not write raw SQL queries via
read_gbq()if a DataFrame/Series method achieves the same result, as it breaks the Pandas abstraction and prevents lazy query execution.Accessors over UDFs/Lambdas:
- Use built-in accessors (e.g.,
df.col.str.*,df.col.dt.*) instead of remote User Defined Functions (UDFs). UDFs require extra resources and time to deploy. - Do not use lambdas with
Series.map()orDataFrame.apply(). These methods do not accept functions withoutudforremote_functiondecorators.
# Avoid: df["upper"] = df["name"].map(lambda x: x.upper()) # Prefer: df["upper"] = df["name"].str.upper()- Use built-in accessors (e.g.,
Schema Verification: Do not assume the schema of intermediate outputs. Proactively verify schemas using
.dtypesand inspect sample records usingdisplay()with.peek().Visualization: Plot directly from the BigFrames DataFrame/Series when possible. BigFrames is compatible with Matplotlib and Seaborn. If direct plotting fails, use the
.plotaccessor. If the dataset is too large to plot, aggregate or sample the data before calling.to_pandas()to plot locally.
Machine Learning
- Use
bigframes.bigquery.mlpackage: Do not use Scikit-learn or other ML libraries with BigQuery DataFrames. Standard Scikit-learn models require bringing data into local client memory, whereasbigframes.bigquery.mldelegates training directly to BigQuery's scalable ML engine. Import functions frombigframes.bigquery.ml.
Reference Directory
- Linear Regression: Train a linear regression model to predict numerical values.
- Logistic Regression: Train a logistic regression model to predict boolean values.
BigFrames ML (Legacy)
The BigFrames ML package (bigframes.ml) is a legacy package that mimics the
scikit-learn API but is no longer recommended for new projects. Only use this
package if the user explicitly requests BigFrames ML.
- Legacy Imports: When legacy BigFrames ML is requested, import tools and
classes from
bigframes.mlinstead ofbigframes.bigquery.ml. - DataFrame Return on Prediction: Unlike Scikit-learn, BigFrames'
predict()method always returns a DataFrame containing both predictions and features, rather than a single series of predictions. - No
random_state: Do not pass arandom_stateargument when instantiating BigFrames ML models, as this parameter is not supported in the BigFrames ML package. - Automatic Scaling: Do not use
OneHotEncoderorStandardScalerunless explicitly requested, as scaling is handled automatical
자주 묻는 질문
전체 테이블을 내려받나요?
아닙니다. 작업을 BigQuery 안에 두고, 모든 행을 내 컴퓨터로 가져오지 않습니다.
SQL만 다루는 작업인가요?
아닙니다. SQL 중심 작업이나 기본 Python 클라이언트 라이브러리를 쓰려면 bigquery-basics 스킬을 사용하세요.
미리 보기 방법은 무엇인가요?
head는 더 느리므로, 대신 빠르게 행을 샘플링하는 peek를 쓰도록 제안합니다.
상세 정보
작성자의 원본 설명
Generates Python code using BigQuery DataFrames (BigFrames). Use by default for any Python data task involving BigQuery, including data processing, analysis, and machine learning. Don't use for SQL-first workflows or the google-cloud-bigquery client library — use bigquery-basics.
repo: google/skills
인기도
- GitHub 스타
- 22k
- 순위
- #10226
- 라이선스
- Apache-2.0
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
finding-google-skills
22k에이전트가 호스팅, 데이터베이스, 저장소, 로그인, AI 모델 제공처럼 설정 작업에 맞는 Google 가이드를 찾도록 돕습니다.
gcloud
22k에이전트가 Google Cloud gcloud 명령을 작성하고 확인하도록 돕습니다. 플래그를 추측하지 않도록 무엇이든 실행하기 전에 정확한 문법을 확인합니다.
google-cloud-recipe-auth
22k에이전트가 Google Cloud의 신원과 접근 권한을 안내합니다. 사람과 서비스가 어떻게 로그인하고 어떤 권한을 받는지 포함합니다.
google-cloud-recipe-onboarding
22k새 개발자가 Google Cloud에서 프로젝트 선택, 결제 연결, 첫 리소스 배포 같은 첫 단계를 밟도록 안내합니다.
비슷한 스킬
gitcrawl
394k에이전트가 저장된 GitHub 이슈와 풀 리퀘스트 보관본을 검색하고, 중복 항목을 묶고, GitHub에서 현재 상태를 확인하도록 돕습니다.
slacrawl
394k에이전트가 로컬 Slack 보관본에서 메시지를 검색하고 개수를 세며, 보관본이 얼마나 최신인지 확인하고 필요할 때 새로 고치도록 돕습니다.
goplaces
394k에이전트가 Google Places로 장소를 검색하고, 세부 정보와 리뷰를 가져오고, 장소 이름을 확인하며, 스크립트용 JSON을 출력하도록 돕습니다.