在jupyter上使用gbq时是否可以删除所有日志?你知道吗
示例:
sql = """
SELECT country_name, alpha_2_code
FROM [bigquery-public-data:utility_us.country_code_iso]
WHERE alpha_2_code LIKE 'Z%'
"""
for i in range(10):
df = pandas_gbq.read_gbq(
sql,
project_id=project_id,
# Set the dialect to "legacy" to use legacy SQL syntax. As of
# pandas-gbq version 0.10.0, the default dialect is "standard".
dialect="legacy",
)
结果:
Downloading: 100%|██████████| 3/3 [00:00<00:00, 3.08rows/s]
Downloading: 100%|██████████| 3/3 [00:00<00:00, 3.06rows/s]
Downloading: 100%|██████████| 3/3 [00:00<00:00, 8.72rows/s]
Downloading: 100%|██████████| 3/3 [00:00<00:00, 6.15rows/s]
Downloading: 100%|██████████| 3/3 [00:00<00:00, 3.24rows/s]
Downloading: 100%|██████████| 3/3 [00:00<00:00, 8.40rows/s]
Downloading: 100%|██████████| 3/3 [00:00<00:00, 3.27rows/s]
Downloading: 100%|██████████| 3/3 [00:00<00:00, 3.18rows/s]
Downloading: 100%|██████████| 3/3 [00:00<00:00, 3.55rows/s]
Downloading: 100%|██████████| 3/3 [00:00<00:00, 3.26rows/s]
我希望结果一无所获。 谢谢
这些不是日志,我还认为有一段时间,但在玩了
logging
库之后,无法删除消息,这是文档推荐给handle log verbosity的消息,但没有成功。你知道吗我跳到code并意识到在
pandas_gbq.read_gbq()
function处有一个progress_bar_type
参数,必须设置为None
才能消除要删除的消息。See the options.因此,当您调用函数时,它应该如下所示:
相关问题 更多 >
编程相关推荐