Skip to content

Commit b1794c1

Browse files
sumanau7Sumanau Sareen
authored and
Sumanau Sareen
committed
Send None parameter to pandas-gbq to set no progress bar
1 parent 556e1c2 commit b1794c1

File tree

5 files changed

+6
-11
lines changed

5 files changed

+6
-11
lines changed

ci/deps/travis-36-locale.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies:
2727
- numexpr
2828
- numpy
2929
- openpyxl
30-
- pandas-gbq=0.8.0
30+
- pandas-gbq=0.12.0
3131
- psycopg2=2.6.2
3232
- pymysql=0.7.11
3333
- pytables

doc/source/getting_started/install.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ lxml 3.8.0 HTML parser for read_html (see :ref
274274
matplotlib 2.2.2 Visualization
275275
numba 0.46.0 Alternative execution engine for rolling operations
276276
openpyxl 2.5.7 Reading / writing for xlsx files
277-
pandas-gbq 0.8.0 Google Big Query access
277+
pandas-gbq 0.12.0 Google Big Query access
278278
psycopg2 PostgreSQL engine for sqlalchemy
279279
pyarrow 0.12.0 Parquet, ORC (requires 0.13.0), and feather reading / writing
280280
pymysql 0.7.11 MySQL engine for sqlalchemy

pandas/compat/_optional.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"numexpr": "2.6.2",
1616
"odfpy": "1.3.0",
1717
"openpyxl": "2.5.7",
18-
"pandas_gbq": "0.8.0",
18+
"pandas_gbq": "0.12.0",
1919
"pyarrow": "0.13.0",
2020
"pytables": "3.4.2",
2121
"pytest": "5.0.1",

pandas/io/gbq.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -162,14 +162,13 @@ def read_gbq(
162162
"""
163163
pandas_gbq = _try_import()
164164

165-
kwargs: Dict[str, Union[str, bool]] = {}
165+
kwargs: Dict[str, Union[str, bool, None]] = {}
166166

167167
# START: new kwargs. Don't populate unless explicitly set.
168168
if use_bqstorage_api is not None:
169169
kwargs["use_bqstorage_api"] = use_bqstorage_api
170170

171-
if progress_bar_type is not None:
172-
kwargs["progress_bar_type"] = progress_bar_type
171+
kwargs["progress_bar_type"] = progress_bar_type
173172
# END: new kwargs
174173

175174
return pandas_gbq.read_gbq(

pandas/tests/io/test_gbq.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -142,11 +142,7 @@ def mock_read_gbq(sql, **kwargs):
142142

143143
monkeypatch.setattr("pandas_gbq.read_gbq", mock_read_gbq)
144144
pd.read_gbq("SELECT 1", progress_bar_type=progress_bar)
145-
146-
if progress_bar:
147-
assert "progress_bar_type" in captured_kwargs
148-
else:
149-
assert "progress_bar_type" not in captured_kwargs
145+
assert "progress_bar_type" in captured_kwargs
150146

151147

152148
@pytest.mark.single

0 commit comments

Comments
 (0)