Skip to content

Commit dd330d6

Browse files
authored
update docs to show pyarrow as the only dependency of load_table_from_dataframe() (googleapis#5582)
1 parent 46b0beb commit dd330d6

2 files changed

Lines changed: 15 additions & 3 deletions

File tree

bigquery/google/cloud/bigquery/client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,8 +892,7 @@ def load_table_from_dataframe(self, dataframe, destination,
892892
Raises:
893893
ImportError:
894894
If a usable parquet engine cannot be found. This method
895-
requires one of :mod:`pyarrow` or :mod:`fastparquet` to be
896-
installed.
895+
requires :mod:`pyarrow` to be installed.
897896
"""
898897
buffer = six.BytesIO()
899898
dataframe.to_parquet(buffer)

docs/bigquery/usage.rst

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,6 +391,9 @@ Jobs describe actions performed on data in BigQuery tables:
391391
Using BigQuery with Pandas
392392
--------------------------
393393

394+
Retrieve BigQuery data as a Pandas DataFrame
395+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
396+
394397
As of version 0.29.0, you can use the
395398
:func:`~google.cloud.bigquery.table.RowIterator.to_dataframe` function to
396399
retrieve query results or table rows as a :class:`pandas.DataFrame`.
@@ -424,10 +427,20 @@ To retrieve table rows as a :class:`pandas.DataFrame`:
424427
:start-after: [START bigquery_list_rows_dataframe]
425428
:end-before: [END bigquery_list_rows_dataframe]
426429

430+
Load a Pandas DataFrame to a BigQuery Table
431+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
432+
427433
As of version 1.3.0, you can use the
428434
:func:`~google.cloud.bigquery.client.Client.load_table_from_dataframe` function
429435
to load data from a :class:`pandas.DataFrame` to a
430-
:class:`~google.cloud.bigquery.table.Table`.
436+
:class:`~google.cloud.bigquery.table.Table`. To use this function, in addition
437+
to :mod:`pandas`, you will need to install the :mod:`pyarrow` library. You can
438+
install the BigQuery python client library with :mod:`pandas` and
439+
:mod:`pyarrow` by running:
440+
441+
.. code-block:: bash
442+
443+
pip install --upgrade google-cloud-bigquery[pandas,pyarrow]
431444
432445
The following example demonstrates how to create a :class:`pandas.DataFrame`
433446
and load it into a new table:

0 commit comments

Comments
 (0)