Skip to content

Commit 34bf7b4

Browse files
committed
Always use initial column count in preview() header
1 parent ca30467 commit 34bf7b4

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pointblank/validate.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,6 +516,9 @@ def _generate_display_table(
516516
else:
517517
import pandas as pd
518518

519+
# Get the initial column count for the table
520+
n_columns = len(data.columns)
521+
519522
# If `columns_subset=` is not None, resolve the columns to display
520523
if columns_subset is not None:
521524
col_names = _get_column_names(data, ibis_tbl=ibis_tbl, df_lib_name_gt=df_lib_name_gt)
@@ -712,7 +715,7 @@ def _generate_display_table(
712715
# Create the label, table type, and thresholds HTML fragments
713716
table_type_html = _create_table_type_html(tbl_type=tbl_type, tbl_name=None, font_size="10px")
714717

715-
tbl_dims_html = _create_table_dims_html(columns=len(col_names), rows=n_rows, font_size="10px")
718+
tbl_dims_html = _create_table_dims_html(columns=n_columns, rows=n_rows, font_size="10px")
716719

717720
# Compose the subtitle HTML fragment
718721
combined_subtitle = (

0 commit comments

Comments
 (0)