Skip to content

Commit 214969d

Browse files
committed
add padding
1 parent 6e49352 commit 214969d

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

bigframes/_config/display_options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class DisplayOptions:
2828

2929
# Options borrowed from pandas.
3030
max_columns: int = 20
31-
max_rows: int = 25
31+
max_rows: int = 10
3232
precision: int = 6
3333

3434
# Options unique to BigQuery DataFrames.

bigframes/display/html.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ def render_html(
4444
table_html.append(' <tr style="text-align: left;">')
4545
for col in dataframe.columns:
4646
table_html.append(
47-
f' <th style="text-align: left;"><div style="resize: horizontal; overflow: auto; width: 100%; height: 100%;">{html.escape(str(col))}</div></th>'
47+
f' <th style="text-align: left;"><div style="resize: horizontal; overflow: auto; box-sizing: border-box; width: 100%; height: 100%; padding: 0.5em;">{html.escape(str(col))}</div></th>'
4848
)
4949
table_html.append(" </tr>")
5050
table_html.append(" </thead>")
5151

5252
# Render table body
53-
table_html.append(" <tbody>")
53+
table_html.append(' <tbody style="padding: 0.5em;">')
5454
for i in range(len(dataframe)):
5555
table_html.append(" <tr>")
5656
row = dataframe.iloc[i]

notebooks/dataframes/anywidget_mode.ipynb

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
{
7777
"data": {
7878
"text/html": [
79-
"Query job 70c9da87-db73-4794-8ad7-a3824a307fb7 is DONE. 0 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:70c9da87-db73-4794-8ad7-a3824a307fb7&page=queryresults\">Open Job</a>"
79+
"Query job a643d120-4af9-44fc-ba3c-ed461cf1092b is DONE. 0 Bytes processed. <a target=\"_blank\" href=\"https://console.cloud.google.com/bigquery?project=bigframes-dev&j=bq:US:a643d120-4af9-44fc-ba3c-ed461cf1092b&page=queryresults\">Open Job</a>"
8080
],
8181
"text/plain": [
8282
"<IPython.core.display.HTML object>"
@@ -142,12 +142,12 @@
142142
{
143143
"data": {
144144
"application/vnd.jupyter.widget-view+json": {
145-
"model_id": "7d9e68222fcc445a8a6c4ad3360495bc",
145+
"model_id": "d2d4ef22ea9f414b89ea5bd85f0e6635",
146146
"version_major": 2,
147147
"version_minor": 1
148148
},
149149
"text/plain": [
150-
"TableWidget(row_count=5552452, table_html='<table border=\"1\" class=\"table table-striped table-hover\" id=\"table"
150+
"TableWidget(page_size=10, row_count=5552452, table_html='<table border=\"1\" class=\"table table-striped table-ho"
151151
]
152152
},
153153
"metadata": {},
@@ -187,18 +187,18 @@
187187
"name": "stdout",
188188
"output_type": "stream",
189189
"text": [
190-
"Total pages: 222099\n"
190+
"Total pages: 555246\n"
191191
]
192192
},
193193
{
194194
"data": {
195195
"application/vnd.jupyter.widget-view+json": {
196-
"model_id": "00d5a037221242cd86d63a9e965d9085",
196+
"model_id": "121e3d2f28004036a922e3a11a08d4b7",
197197
"version_major": 2,
198198
"version_minor": 1
199199
},
200200
"text/plain": [
201-
"TableWidget(row_count=5552452, table_html='<table border=\"1\" class=\"table table-striped table-hover\" id=\"table"
201+
"TableWidget(page_size=10, row_count=5552452, table_html='<table border=\"1\" class=\"table table-striped table-ho"
202202
]
203203
},
204204
"execution_count": 7,
@@ -265,7 +265,7 @@
265265
},
266266
{
267267
"cell_type": "code",
268-
"execution_count": 11,
268+
"execution_count": 9,
269269
"id": "a9d5d13a",
270270
"metadata": {},
271271
"outputs": [
@@ -287,15 +287,15 @@
287287
{
288288
"data": {
289289
"application/vnd.jupyter.widget-view+json": {
290-
"model_id": "8518a12b62a04b25a4282629e52c0a2f",
290+
"model_id": "5ed335bbbc064e5391ea06a9a218642e",
291291
"version_major": 2,
292292
"version_minor": 1
293293
},
294294
"text/plain": [
295-
"TableWidget(row_count=5, table_html='<table border=\"1\" class=\"table table-striped table-hover\" id=\"table-71b10"
295+
"TableWidget(page_size=10, row_count=5, table_html='<table border=\"1\" class=\"table table-striped table-hover\" i"
296296
]
297297
},
298-
"execution_count": 11,
298+
"execution_count": 9,
299299
"metadata": {},
300300
"output_type": "execute_result"
301301
}

0 commit comments

Comments
 (0)