https://github.com/googleapis/python-bigquery-dataframes
BigQuery DataFrames
https://github.com/googleapis/python-bigquery-dataframes
bigquery data-science machine-learning python
Last synced: about 2 months ago
JSON representation
BigQuery DataFrames
- Host: GitHub
- URL: https://github.com/googleapis/python-bigquery-dataframes
- Owner: googleapis
- License: other
- Created: 2023-07-17T22:06:16.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-05-12T21:38:18.000Z (about 1 year ago)
- Last Synced: 2025-05-12T21:39:15.521Z (about 1 year ago)
- Topics: bigquery, data-science, machine-learning, python
- Language: Python
- Homepage: https://cloud.google.com/python/docs/reference/bigframes/latest
- Size: 17.9 MB
- Stars: 244
- Watchers: 28
- Forks: 48
- Open Issues: 55
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
- Support: docs/supported_pandas_apis.rst
Awesome Lists containing this project
README
BigQuery DataFrames (BigFrames)
===============================
|GA| |pypi| |versions|
BigQuery DataFrames (also known as BigFrames) provides a Pythonic DataFrame
and machine learning (ML) API powered by the BigQuery engine. It provides modules
for many use cases, including:
* `bigframes.pandas `_
is a pandas API for analytics. Many workloads can be
migrated from pandas to bigframes by just changing a few imports.
* `bigframes.ml `_
is a scikit-learn-like API for ML.
* `bigframes.bigquery.ai `_
are a collection of powerful AI methods, powered by Gemini.
BigQuery DataFrames is an `open-source package `_.
.. |GA| image:: https://img.shields.io/badge/support-GA-gold.svg
:target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#general-availability
.. |pypi| image:: https://img.shields.io/pypi/v/bigframes.svg
:target: https://pypi.org/project/bigframes/
.. |versions| image:: https://img.shields.io/pypi/pyversions/bigframes.svg
:target: https://pypi.org/project/bigframes/
Getting started with BigQuery DataFrames
----------------------------------------
The easiest way to get started is to try the
`BigFrames quickstart `_
in a `notebook in BigQuery Studio `_.
To use BigFrames in your local development environment,
1. Run ``pip install --upgrade bigframes`` to install the latest version.
2. Setup `Application default credentials `_
for your local development environment enviroment.
3. Create a `GCP project with the BigQuery API enabled `_.
4. Use the ``bigframes`` package to query data.
.. code-block:: python
import bigframes.pandas as bpd
bpd.options.bigquery.project = your_gcp_project_id # Optional in BQ Studio.
bpd.options.bigquery.ordering_mode = "partial" # Recommended for performance.
df = bpd.read_gbq("bigquery-public-data.usa_names.usa_1910_2013")
print(
df.groupby("name")
.agg({"number": "sum"})
.sort_values("number", ascending=False)
.head(10)
.to_pandas()
)
Documentation
-------------
To learn more about BigQuery DataFrames, visit these pages
* `Introduction to BigQuery DataFrames (BigFrames) `_
* `Sample notebooks `_
* `API reference `_
* `Source code (GitHub) `_
License
-------
BigQuery DataFrames is distributed with the `Apache-2.0 license
`_.
It also contains code derived from the following third-party packages:
* `Ibis `_
* `pandas `_
* `Python `_
* `scikit-learn `_
* `XGBoost `_
* `SQLGlot `_
For details, see the `third_party
`_
directory.
Contact Us
----------
For further help and provide feedback, you can email us at `bigframes-feedback@google.com `_.