Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3e06961

Browse files
authored
Close the to_dataframe progress bar when finished. (#7757)
1 parentee804a1 commit3e06961

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

‎bigquery/google/cloud/bigquery/table.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1385,6 +1385,10 @@ def _to_dataframe_tabledata_list(self, dtypes, progress_bar=None):
13851385
progress_bar.total=progress_bar.totalorself.total_rows
13861386
progress_bar.update(len(current_frame))
13871387

1388+
ifprogress_barisnotNone:
1389+
# Indicate that the download has finished.
1390+
progress_bar.close()
1391+
13881392
returnpandas.concat(frames)
13891393

13901394
def_to_dataframe_bqstorage_stream(

‎bigquery/tests/unit/test_table.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,6 +1503,7 @@ def test_to_dataframe_progress_bar(
15031503

15041504
progress_bar_mock.assert_called()
15051505
progress_bar_mock().update.assert_called()
1506+
progress_bar_mock().close.assert_called_once()
15061507
self.assertEqual(len(df),4)
15071508

15081509
@unittest.skipIf(pandasisNone,"Requires `pandas`")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp