-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: Add progress_bar_type argument in read_gbq #29858
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
jreback
merged 14 commits into
pandas-dev:master
from
charlesdong1991:add_bar_progress_gbq
Dec 8, 2019
Merged
Changes from 13 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
7e461a1
remove \n from docstring
charlesdong1991 1314059
fix conflicts
charlesdong1991 8bcb313
Merge remote-tracking branch 'upstream/master'
charlesdong1991 2eafb1e
Merge remote-tracking branch 'upstream/master' into add_bar_progress_gbq
charlesdong1991 642281d
Add progress bar type for read_gbq
charlesdong1991 db72514
better doc
charlesdong1991 ef2960d
fix doc failure
charlesdong1991 87f5e51
Merge remote-tracking branch 'upstream/master' into add_bar_progress_gbq
charlesdong1991 e184305
Add whatsnew note
charlesdong1991 2d35bdd
Merge remote-tracking branch 'upstream/master' into add_bar_progress_gbq
charlesdong1991 1464b59
try fix doc error
charlesdong1991 01207a8
try find where the doc error is
charlesdong1991 9020a06
add corrected doc
charlesdong1991 2ff5903
code change based on reviews
charlesdong1991 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -27,6 +27,7 @@ def read_gbq( | |||||||
use_bqstorage_api=None, | ||||||||
private_key=None, | ||||||||
verbose=None, | ||||||||
progress_bar_type="tqdm", | ||||||||
): | ||||||||
""" | ||||||||
Load data from Google BigQuery. | ||||||||
|
@@ -134,6 +135,29 @@ def read_gbq( | |||||||
Deprecated in pandas-gbq version 0.4.0. Use the `logging module to | ||||||||
adjust verbosity instead | ||||||||
<https://pandas-gbq.readthedocs.io/en/latest/intro.html#logging>`__. | ||||||||
progress_bar_type : Optional, str | ||||||||
If set, use the `tqdm <https://tqdm.github.io/>`__ library to | ||||||||
display a progress bar while the data downloads. Install the | ||||||||
``tqdm`` package to use this feature. | ||||||||
|
||||||||
Possible values of ``progress_bar_type`` include: | ||||||||
|
||||||||
``None`` | ||||||||
No progress bar. | ||||||||
``'tqdm'`` | ||||||||
Use the :func:`tqdm.tqdm` function to print a progress bar | ||||||||
to :data:`sys.stderr`. | ||||||||
``'tqdm_notebook'`` | ||||||||
Use the :func:`tqdm.tqdm_notebook` function to display a | ||||||||
progress bar as a Jupyter notebook widget. | ||||||||
``'tqdm_gui'`` | ||||||||
Use the :func:`tqdm.tqdm_gui` function to display a | ||||||||
progress bar as a graphical dialog box. | ||||||||
|
||||||||
Note that his feature requires version 0.12.0 or later of the | ||||||||
``pandas-gbq`` package. And it requires the ``tqdm`` package. | ||||||||
|
||||||||
.. versionadded:: 1.0.0 | ||||||||
|
||||||||
Returns | ||||||||
------- | ||||||||
|
@@ -152,6 +176,8 @@ def read_gbq( | |||||||
# START: new kwargs. Don't populate unless explicitly set. | ||||||||
if use_bqstorage_api is not None: | ||||||||
kwargs["use_bqstorage_api"] = use_bqstorage_api | ||||||||
|
||||||||
kwargs["progress_bar_type"] = progress_bar_type | ||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To avoid breaking people with
Suggested change
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks @tswast for your reviews!! |
||||||||
# END: new kwargs | ||||||||
|
||||||||
# START: deprecated kwargs. Don't populate unless explicitly set. | ||||||||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's default to
None
until there have been a few morepandas-gbq
releases with this feature.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changed!! thanks!!