|
1 |
| -BigQuery DataFrames |
2 |
| -=================== |
| 1 | +BigQuery DataFrames (BigFrames) |
| 2 | +=============================== |
3 | 3 |
|
4 | 4 | |GA| |pypi| |versions|
|
5 | 5 |
|
6 |
| -BigQuery DataFrames provides a Pythonic DataFrame and machine learning (ML) API |
7 |
| -powered by the BigQuery engine. |
| 6 | +BigQuery DataFrames (also known as BigFrames) provides a Pythonic DataFrame |
| 7 | +and machine learning (ML) API powered by the BigQuery engine. |
8 | 8 |
|
9 | 9 | * ``bigframes.pandas`` provides a pandas-compatible API for analytics.
|
10 | 10 | * ``bigframes.ml`` provides a scikit-learn-like API for ML.
|
11 | 11 |
|
12 |
| -BigQuery DataFrames is an open-source package. You can run |
13 |
| -``pip install --upgrade bigframes`` to install the latest version. |
| 12 | +BigQuery DataFrames is an open-source package. |
| 13 | + |
| 14 | +**Version 2.0 introduces breaking changes for improved security and performance. See below for details.** |
| 15 | + |
| 16 | +Getting started with BigQuery DataFrames |
| 17 | +---------------------------------------- |
| 18 | + |
| 19 | +The easiest way to get started is to try the |
| 20 | +`BigFrames quickstart <https://cloud.google.com/bigquery/docs/dataframes-quickstart>`_ |
| 21 | +in a `notebook in BigQuery Studio <https://cloud.google.com/bigquery/docs/notebooks-introduction>`_. |
| 22 | + |
| 23 | +To use BigFrames in your local development environment, |
| 24 | + |
| 25 | +1. Run ``pip install --upgrade bigframes`` to install the latest version. |
| 26 | + |
| 27 | +2. Setup `Application default credentials <https://cloud.google.com/docs/authentication/set-up-adc-local-dev-environment>`_ |
| 28 | + for your local development environment enviroment. |
| 29 | + |
| 30 | +3. Create a `GCP project with the BigQuery API enabled <https://cloud.google.com/bigquery/docs/sandbox>`_. |
| 31 | + |
| 32 | +4. Use the ``bigframes`` package to query data. |
| 33 | + |
| 34 | +.. code-block:: python |
| 35 | +
|
| 36 | + import bigframes.pandas as bpd |
| 37 | +
|
| 38 | + bpd.options.bigquery.project = your_gcp_project_id |
| 39 | + df = bpd.read_gbq("bigquery-public-data.usa_names.usa_1910_2013") |
| 40 | + print( |
| 41 | + df.groupby("name") |
| 42 | + .agg({"number": "sum"}) |
| 43 | + .sort_values("number", ascending=False) |
| 44 | + .head(10) |
| 45 | + .to_pandas() |
| 46 | + ) |
| 47 | +
|
| 48 | +
|
| 49 | +Documentation |
| 50 | +------------- |
| 51 | + |
| 52 | +To learn more about BigQuery DataFrames, visit these pages |
| 53 | + |
| 54 | +* `Introduction to BigQuery DataFrames (BigFrames) <https://cloud.google.com/bigquery/docs/bigquery-dataframes-introduction>`_ |
| 55 | +* `Sample notebooks <https://github.com/googleapis/python-bigquery-dataframes/tree/main/notebooks>`_ |
| 56 | +* `API reference <https://cloud.google.com/python/docs/reference/bigframes/latest/summary_overview>`_ |
| 57 | +* `Source code (GitHub) <https://github.com/googleapis/python-bigquery-dataframes>`_ |
14 | 58 |
|
15 | 59 | ⚠️ Warning: Breaking Changes in BigQuery DataFrames v2.0
|
16 | 60 | --------------------------------------------------------
|
@@ -44,22 +88,6 @@ To learn about these changes and how to migrate to version 2.0, see the
|
44 | 88 | .. |versions| image:: https://img.shields.io/pypi/pyversions/bigframes.svg
|
45 | 89 | :target: https://pypi.org/project/bigframes/
|
46 | 90 |
|
47 |
| -Documentation |
48 |
| -------------- |
49 |
| - |
50 |
| -* `BigQuery DataFrames source code (GitHub) <https://github.com/googleapis/python-bigquery-dataframes>`_ |
51 |
| -* `BigQuery DataFrames sample notebooks <https://github.com/googleapis/python-bigquery-dataframes/tree/main/notebooks>`_ |
52 |
| -* `BigQuery DataFrames API reference <https://cloud.google.com/python/docs/reference/bigframes/latest/summary_overview>`_ |
53 |
| -* `BigQuery DataFrames supported pandas APIs <https://cloud.google.com/python/docs/reference/bigframes/latest/supported_pandas_apis>`_ |
54 |
| - |
55 |
| - |
56 |
| -Getting started with BigQuery DataFrames |
57 |
| ----------------------------------------- |
58 |
| -Read `Introduction to BigQuery DataFrames <https://cloud.google.com/bigquery/docs/bigquery-dataframes-introduction>`_ |
59 |
| -and try the `BigQuery DataFrames quickstart <https://cloud.google.com/bigquery/docs/dataframes-quickstart>`_ |
60 |
| -to get up and running in just a few minutes. |
61 |
| - |
62 |
| - |
63 | 91 | License
|
64 | 92 | -------
|
65 | 93 |
|
|
0 commit comments