Skip to content
Back to skills

Source 5c4c0b5e1603fc0b01a64b30

ASecurity

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.

  • 2 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 7, 2026
datapythongosqlapi

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned November 7, 2026

npx -y skills add gutsofpratik/OpenClaude-Skills --skill source-5c4c0b5e1603fc0b01a64b30 --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Source 5c4c0b5e1603fc0b01a64b30?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Source 5c4c0b5e1603fc0b01a64b30
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/gutsofpratik-source-5c4c0b5e1603fc0b01a64b30/badge)](https://www.skillsdirectory.com/skills/gutsofpratik-source-5c4c0b5e1603fc0b01a64b30)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: bigquery-bigframes
metadata:
  version: v3
description: >-
  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.

---

# BigFrames (BigQuery DataFrame) basics
BigFrames is a Python library that lets you take advantage of BigQuery
data processing by using familiar Python APIs.

## Generic Coding Guidelines

*   **Avoid `.to_pandas()`**: You MUST NOT use `.to_pandas()` to download the
    entire dataset into memory. 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()`
*   **Avoid `read_gbq()` for SQL**: Do not write SQL queries and execute them
    with `read_gbq()`. 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. 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()` or `DataFrame.apply()`.
*   **Schema Verification**: Do not assume schema of intermediate outputs.
    Check `.dtypes` after loading, and use `display()` 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 "plot" accessor. If that didn't work either, you MUST
    sample or aggregate your data to make it small enough before calling
    "to_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 a `random_state` argument when
    instantiating BigFrames ML models.
*   **Automatic Scaling**: Do not use `OneHotEncoder` or `StandardScaler`
    unless explicitly requested (handled automatically).
*   **Hyperparameter Tuning**: You must write custom loops (BigFrames lacks
    `GridSearchCV` or `RandomizedSearchCV`).
*   **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.
*   **PCA**: BigFrames' PCA class lacks simple `transform()` method. Use
    `predict()` instead.
*   **Model Persistence**: To persist a model, use `model.to_gbq()`. To load a
    persisted model, use `bpd.read_gbq_model()`.

Files in this skill

  • PROVENANCE.json244 B
  • SKILL.md3.1 KB
  • UPSTREAM-LICENSE.txt11.1 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.