From dbd346952317901d288bc13f7ad2582f76f71a59 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Tue, 28 Nov 2017 08:43:45 -0800 Subject: [PATCH 1/3] Update pandas.read_gbq docs to point to pandas-gbq The `pandas-gbq` package must be installed to use `pandas.read_gbq`. Also, with soon-to-be-release version 0.3.0 of `pandas-gbq` the Google Cloud client library is used instead of the Google API library. Also, standard SQL is no longer beta. In fact it is highly recommended over using legacy SQL. --- pandas/io/gbq.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pandas/io/gbq.py b/pandas/io/gbq.py index 12e52123064e2..adedfb2bd38ae 100644 --- a/pandas/io/gbq.py +++ b/pandas/io/gbq.py @@ -29,9 +29,11 @@ def read_gbq(query, project_id=None, index_col=None, col_order=None, The main method a user calls to execute a Query in Google BigQuery and read results into a pandas DataFrame. - Google BigQuery API Client Library v2 for Python is used. - Documentation is available `here - `__ + This function requires the `pandas-gbq package + `__ which uses the `Google Cloud + BigQuery Client Library for Python + `__ + as of version 0.3.0 of the ``pandas-gbq`` library. Authentication to the Google BigQuery service is via OAuth 2.0. @@ -70,7 +72,7 @@ def read_gbq(query, project_id=None, index_col=None, col_order=None, dialect : {'legacy', 'standard'}, default 'legacy' 'legacy' : Use BigQuery's legacy SQL dialect. - 'standard' : Use BigQuery's standard SQL (beta), which is + 'standard' : Use BigQuery's standard SQL, which is compliant with the SQL 2011 standard. For more information see `BigQuery SQL Reference `__ From 0c33e58b4063ec2b8baec9367b6969725cd82b98 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Wed, 29 Nov 2017 16:11:13 -0800 Subject: [PATCH 2/3] Make pandas-gbq optional dependency consistent with others in the list. --- doc/source/install.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/source/install.rst b/doc/source/install.rst index b8968e18aecb0..7c1fde119ceaa 100644 --- a/doc/source/install.rst +++ b/doc/source/install.rst @@ -259,7 +259,8 @@ Optional Dependencies `xsel `__, or `xclip `__: necessary to use :func:`~pandas.read_clipboard`. Most package managers on Linux distributions will have ``xclip`` and/or ``xsel`` immediately available for installation. -* For Google BigQuery I/O - see `here `__ +* `pandas-gbq `__: for Google BigQuery I/O. + * `Backports.lzma `__: Only for Python 2, for writing to and/or reading from an xz compressed DataFrame in CSV; Python 3 support is built into the standard library. * One of the following combinations of libraries is needed to use the From 135d2f86b70aa75ae11bbf59ffeae87afe61e082 Mon Sep 17 00:00:00 2001 From: Tim Swast Date: Wed, 29 Nov 2017 16:12:49 -0800 Subject: [PATCH 3/3] Remove references to Google Cloud client library. --- pandas/io/gbq.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pandas/io/gbq.py b/pandas/io/gbq.py index adedfb2bd38ae..b452b0cf5ddd4 100644 --- a/pandas/io/gbq.py +++ b/pandas/io/gbq.py @@ -30,10 +30,7 @@ def read_gbq(query, project_id=None, index_col=None, col_order=None, and read results into a pandas DataFrame. This function requires the `pandas-gbq package - `__ which uses the `Google Cloud - BigQuery Client Library for Python - `__ - as of version 0.3.0 of the ``pandas-gbq`` library. + `__. Authentication to the Google BigQuery service is via OAuth 2.0.