@@ -27,6 +27,7 @@ def read_gbq(
27
27
use_bqstorage_api = None ,
28
28
private_key = None ,
29
29
verbose = None ,
30
+ progress_bar_type = None ,
30
31
):
31
32
"""
32
33
Load data from Google BigQuery.
@@ -134,6 +135,30 @@ def read_gbq(
134
135
Deprecated in pandas-gbq version 0.4.0. Use the `logging module to
135
136
adjust verbosity instead
136
137
<https://pandas-gbq.readthedocs.io/en/latest/intro.html#logging>`__.
138
+ progress_bar_type : Optional, str
139
+ If set, use the `tqdm <https://tqdm.github.io/>`__ library to
140
+ display a progress bar while the data downloads. Install the
141
+ ``tqdm`` package to use this feature.
142
+
143
+ Possible values of ``progress_bar_type`` include:
144
+
145
+ ``None``
146
+ No progress bar.
147
+ ``'tqdm'``
148
+ Use the :func:`tqdm.tqdm` function to print a progress bar
149
+ to :data:`sys.stderr`.
150
+ ``'tqdm_notebook'``
151
+ Use the :func:`tqdm.tqdm_notebook` function to display a
152
+ progress bar as a Jupyter notebook widget.
153
+ ``'tqdm_gui'``
154
+ Use the :func:`tqdm.tqdm_gui` function to display a
155
+ progress bar as a graphical dialog box.
156
+
157
+ Note that his feature requires version 0.12.0 or later of the
158
+ ``pandas-gbq`` package. And it requires the ``tqdm`` package. Slightly
159
+ different than ``pandas-gbq``, here the default is ``None``.
160
+
161
+ .. versionadded:: 1.0.0
137
162
138
163
Returns
139
164
-------
@@ -152,6 +177,9 @@ def read_gbq(
152
177
# START: new kwargs. Don't populate unless explicitly set.
153
178
if use_bqstorage_api is not None :
154
179
kwargs ["use_bqstorage_api" ] = use_bqstorage_api
180
+
181
+ if progress_bar_type is not None :
182
+ kwargs ["progress_bar_type" ] = progress_bar_type
155
183
# END: new kwargs
156
184
157
185
# START: deprecated kwargs. Don't populate unless explicitly set.
0 commit comments