Skip to content

Commit f6265db

Browse files
authored
docs: rearrange README.rst to include a short code sample (#1812)
* docs: rearrange README.rst to include a short code sample Towards internal issue 424443170 * change to BigFrames
1 parent e586151 commit f6265db

File tree

1 file changed

+50
-22
lines changed

1 file changed

+50
-22
lines changed

README.rst

Lines changed: 50 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,60 @@
1-
BigQuery DataFrames
2-
===================
1+
BigQuery DataFrames (BigFrames)
2+
===============================
33

44
|GA| |pypi| |versions|
55

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.
88

99
* ``bigframes.pandas`` provides a pandas-compatible API for analytics.
1010
* ``bigframes.ml`` provides a scikit-learn-like API for ML.
1111

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>`_
1458

1559
⚠️ Warning: Breaking Changes in BigQuery DataFrames v2.0
1660
--------------------------------------------------------
@@ -44,22 +88,6 @@ To learn about these changes and how to migrate to version 2.0, see the
4488
.. |versions| image:: https://img.shields.io/pypi/pyversions/bigframes.svg
4589
:target: https://pypi.org/project/bigframes/
4690

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-
6391
License
6492
-------
6593

0 commit comments

Comments
 (0)