Skip to content

Commit b1ea082

Browse files
authored
chore: complete bigframes migration (#16682)
- Reformat with nox - Enable generation with librarian - Regenerate with librarian
1 parent c3d89c2 commit b1ea082

File tree

4 files changed

+105
-13
lines changed

4 files changed

+105
-13
lines changed

librarian.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ default:
5555
libraries:
5656
- name: bigframes
5757
version: 2.39.0
58-
skip_generate: true
5958
python:
6059
library_type: INTEGRATION
6160
name_pretty_override: A unified Python API in BigQuery
Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
{
2-
"name": "bigframes",
3-
"name_pretty": "A unified Python API in BigQuery",
4-
"product_documentation": "https://cloud.google.com/bigquery",
2+
"api_id": "bigquery.googleapis.com",
3+
"api_shortname": "bigquery",
54
"client_documentation": "https://cloud.google.com/python/docs/reference/bigframes/latest",
5+
"distribution_name": "bigframes",
66
"issue_tracker": "https://github.com/googleapis/python-bigquery-dataframes/issues",
7-
"release_level": "preview",
87
"language": "python",
98
"library_type": "INTEGRATION",
10-
"repo": "googleapis/google-cloud-python",
11-
"distribution_name": "bigframes",
12-
"api_id": "bigquery.googleapis.com",
13-
"default_version": "",
14-
"codeowner_team": "@googleapis/bigquery-dataframe-team",
15-
"api_shortname": "bigquery"
16-
}
9+
"name": "bigframes",
10+
"name_pretty": "A unified Python API in BigQuery",
11+
"product_documentation": "https://cloud.google.com/bigquery",
12+
"release_level": "stable",
13+
"repo": "googleapis/google-cloud-python"
14+
}

packages/bigframes/bigframes/session/loader.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@
5454
from google.cloud import bigquery_storage_v1
5555
from google.cloud.bigquery_storage_v1 import (
5656
types as bq_storage_types,
57+
)
58+
from google.cloud.bigquery_storage_v1 import (
5759
writer as bq_storage_writer,
5860
)
5961

packages/bigframes/docs/README.rst

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/bigframes/docs/README.rst

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
BigQuery DataFrames (BigFrames)
2+
===============================
3+
4+
5+
|GA| |pypi| |versions|
6+
7+
BigQuery DataFrames (also known as BigFrames) provides a Pythonic DataFrame
8+
and machine learning (ML) API powered by the BigQuery engine. It provides modules
9+
for many use cases, including:
10+
11+
* `bigframes.pandas <https://dataframes.bigquery.dev/reference/api/bigframes.pandas.html>`_
12+
is a pandas API for analytics. Many workloads can be
13+
migrated from pandas to bigframes by just changing a few imports.
14+
* `bigframes.ml <https://dataframes.bigquery.dev/reference/index.html#ml-apis>`_
15+
is a scikit-learn-like API for ML.
16+
* `bigframes.bigquery.ai <https://dataframes.bigquery.dev/reference/api/bigframes.bigquery.ai.html>`_
17+
are a collection of powerful AI methods, powered by Gemini.
18+
19+
BigQuery DataFrames is an `open-source package <https://github.com/googleapis/google-cloud-python>`_.
20+
21+
.. |GA| image:: https://img.shields.io/badge/support-GA-gold.svg
22+
:target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#general-availability
23+
.. |pypi| image:: https://img.shields.io/pypi/v/bigframes.svg
24+
:target: https://pypi.org/project/bigframes/
25+
.. |versions| image:: https://img.shields.io/pypi/pyversions/bigframes.svg
26+
:target: https://pypi.org/project/bigframes/
27+
28+
Getting started with BigQuery DataFrames
29+
----------------------------------------
30+
31+
The easiest way to get started is to try the
32+
`BigFrames quickstart <https://cloud.google.com/bigquery/docs/dataframes-quickstart>`_
33+
in a `notebook in BigQuery Studio <https://cloud.google.com/bigquery/docs/notebooks-introduction>`_.
34+
35+
To use BigFrames in your local development environment,
36+
37+
1. Run ``pip install --upgrade bigframes`` to install the latest version.
38+
39+
2. Setup `Application default credentials <https://cloud.google.com/docs/authentication/set-up-adc-local-dev-environment>`_
40+
for your local development environment enviroment.
41+
42+
3. Create a `GCP project with the BigQuery API enabled <https://cloud.google.com/bigquery/docs/sandbox>`_.
43+
44+
4. Use the ``bigframes`` package to query data.
45+
46+
.. code-block:: python
47+
48+
import bigframes.pandas as bpd
49+
50+
bpd.options.bigquery.project = your_gcp_project_id # Optional in BQ Studio.
51+
bpd.options.bigquery.ordering_mode = "partial" # Recommended for performance.
52+
df = bpd.read_gbq("bigquery-public-data.usa_names.usa_1910_2013")
53+
print(
54+
df.groupby("name")
55+
.agg({"number": "sum"})
56+
.sort_values("number", ascending=False)
57+
.head(10)
58+
.to_pandas()
59+
)
60+
61+
Documentation
62+
-------------
63+
64+
To learn more about BigQuery DataFrames, visit these pages
65+
66+
* `Introduction to BigQuery DataFrames (BigFrames) <https://cloud.google.com/bigquery/docs/bigquery-dataframes-introduction>`_
67+
* `Sample notebooks <https://github.com/googleapis/google-cloud-python/tree/main/notebooks>`_
68+
* `API reference <https://dataframes.bigquery.dev/>`_
69+
* `Source code (GitHub) <https://github.com/googleapis/google-cloud-python>`_
70+
71+
License
72+
-------
73+
74+
BigQuery DataFrames is distributed with the `Apache-2.0 license
75+
<https://github.com/googleapis/google-cloud-python/blob/main/LICENSE>`_.
76+
77+
It also contains code derived from the following third-party packages:
78+
79+
* `Ibis <https://ibis-project.org/>`_
80+
* `pandas <https://pandas.pydata.org/>`_
81+
* `Python <https://www.python.org/>`_
82+
* `scikit-learn <https://scikit-learn.org/>`_
83+
* `XGBoost <https://xgboost.readthedocs.io/en/stable/>`_
84+
* `SQLGlot <https://sqlglot.com/sqlglot.html>`_
85+
86+
For details, see the `third_party
87+
<https://github.com/googleapis/google-cloud-python/tree/main/third_party/bigframes_vendored>`_
88+
directory.
89+
90+
91+
Contact Us
92+
----------
93+
94+
For further help and provide feedback, you can email us at `bigframes-feedback@google.com <https://mail.google.com/mail/?view=cm&fs=1&tf=1&to=bigframes-feedback@google.com>`_.

0 commit comments

Comments
 (0)