diff --git a/greater_tables/__init__.py b/greater_tables/__init__.py index ad1e3d9..0a393d0 100644 --- a/greater_tables/__init__.py +++ b/greater_tables/__init__.py @@ -1,6 +1,6 @@ __project__ = 'greater_tables' __author__ = 'Stephen J Mildenhall' -__version__ = '5.4' +__version__ = '5.4.1' from . core import GT from . fabrications import * diff --git a/greater_tables/config.py b/greater_tables/config.py index 0e5e9b9..60c4ccb 100644 --- a/greater_tables/config.py +++ b/greater_tables/config.py @@ -84,7 +84,7 @@ class Configurator(BaseModel): None, description="Manual padding in the order (top, right, bottom, left)" ) tex_to_html: Optional[Callable[[str], str]] = Field( - default=None, description="Function to map non-math TeX to HTML, eg remap \\textbf{...}") + default=None, description="Function to map non-math TeX (or markdown) to HTML, e.g., remap \\textbf{...} or to map *italics* to italics.") font_body: float = Field( 0.9, description="Font size for body text (in em units)" diff --git a/greater_tables/core.py b/greater_tables/core.py index aded50f..5abd967 100644 --- a/greater_tables/core.py +++ b/greater_tables/core.py @@ -261,7 +261,7 @@ class GT(object): df = pd.DataFrame(df) # override this selection come what may show_index = False - if config.header_row: + if self.config.header_row: # Set first row as column names df.columns = df.iloc[0] # Drop first row and reset index @@ -1148,7 +1148,8 @@ class GT(object): # OK severely too small ans['recommended'] = ans['minimum_width'] space = target_width - minimum - logger.warning( + # hard to shut this up... + logger.info( 'Mode %s, desired width too small for pleasant formatting, table will be too wide by spare space %s em < 0.', mode, space) logger.info(f'{mode=} {target_width=}, {natural=}, {acceptable=}, {minimum=}, {max_extra=}, {space=}') diff --git a/greater_tables/utilities.py b/greater_tables/utilities.py index 1ef0870..72ff600 100644 --- a/greater_tables/utilities.py +++ b/greater_tables/utilities.py @@ -13,12 +13,19 @@ from pybtex.textutils import width from rich import box from rich.table import Table -from . formats import GT_Format, TableFormat, Line, DataRow +from .formats import GT_Format, TableFormat, Line, DataRow -__all__ = ['MD2DF', 'Escaping', 'TextLength', - 'Sparsify', 'Indexing', 'Width', 'TextOutput', - 'RichOutput'] +__all__ = [ + "MD2DF", + "Escaping", + "TextLength", + "Sparsify", + "Indexing", + "Width", + "TextOutput", + "RichOutput", +] logger = logging.getLogger(__name__) @@ -26,48 +33,50 @@ logger = logging.getLogger(__name__) class MD2DF: """Convert markdown to dataframe.""" + @staticmethod def md_to_df(txt): """Convert markdown text string table to DataFrame.""" # extract table and optional caption part table, caption = MD2DF.parse_markdown_table_and_caption(txt) - m = re.search(r'\{#(tbl[:a-zA-Z0-9_-]+)\}', caption) + m = re.search(r"\{#(tbl[:a-zA-Z0-9_-]+)\}", caption) if m: label = m.group(1) - if label != '': + if label != "": # remove from caption - caption = caption.replace(f'{{#{label}}}', '').strip() + caption = caption.replace(f"{{#{label}}}", "").strip() else: - label = '' + label = "" # print(f'{caption = } and {label = }') - if table == '': - raise ValueError('Bad markdown table') + if table == "": + raise ValueError("Bad markdown table") # remove starting and ending | in each line (optional anyway) - txt = re.sub(r'^\||\|$', '', table, flags=re.MULTILINE) - txt = txt.split('\n') + txt = re.sub(r"^\||\|$", "", table, flags=re.MULTILINE) + txt = txt.split("\n") # remove starting and ending *'s added by hand - but try to avoid * within headings! - txt[0] = '|'.join([re.sub(r'^\*\*?|\*\*?$', '', i.strip()) - for i in txt[0].split('|')]) + txt[0] = "|".join( + [re.sub(r"^\*\*?|\*\*?$", "", i.strip()) for i in txt[0].split("|")] + ) # remove the alignment row alignment_row = txt.pop(1) aligners = [] - for t in alignment_row.split('|'): - if t[0] == ':' and t[-1] == ':': - aligners.append('c') - elif t[0] == ':': - aligners.append('l') - elif t[-1] == ':': - aligners.append('r') + for t in alignment_row.split("|"): + if t[0] == ":" and t[-1] == ":": + aligners.append("c") + elif t[0] == ":": + aligners.append("l") + elif t[-1] == ":": + aligners.append("r") else: # no alignment info pass if len(aligners) == 0: aligners = None else: - aligners = ''.join(aligners) - txt = [[j.strip() for j in i.split('|')] for i in txt] + aligners = "".join(aligners) + txt = [[j.strip() for j in i.split("|")] for i in txt] df = pd.DataFrame(txt).T df = df.set_index(0) df = df.T @@ -87,7 +96,8 @@ class MD2DF: """ table_match = re.search(r"((?:\|.*\|\s*(?:\n|$))+)", txt, re.DOTALL) caption_match = re.search( - r"^(?:table)?:\s*(.+)", txt, re.MULTILINE + re.IGNORECASE) + r"^(?:table)?:\s*(.+)", txt, re.MULTILINE + re.IGNORECASE + ) table_part = table_match.group(1).strip() if table_match else "" caption_part = caption_match.group(1) if caption_match else "" @@ -97,6 +107,7 @@ class MD2DF: class Escaping: """Escape html and tex within tables.""" + @staticmethod def clean_name(n): """ @@ -111,8 +122,12 @@ class Escaping: try: if type(n) == str: # quote underscores that are not in dollars - return '$'.join((i if n % 2 else i.replace('_', '\\_').replace('%', '\\%') - for n, i in enumerate(n.split('$')))) + return "$".join( + ( + i if n % 2 else i.replace("_", "\\_").replace("%", "\\%") + for n, i in enumerate(n.split("$")) + ) + ) else: # can't contain an underscore! return str(n) @@ -137,9 +152,9 @@ class Escaping: Apply after all other HTML rendering steps. HTML rendering only. """ - text = re.sub(r'\$\$(.*?)\$\$', r'\\[\1\\]', text, flags=re.DOTALL) + text = re.sub(r"\$\$(.*?)\$\$", r"\\[\1\\]", text, flags=re.DOTALL) # Convert inline math: $...$ → \(...\) - text = re.sub(r'(?]*>', '', text) + return re.sub(r"<[^>]*>", "", text) def decode_entities(text): return html.unescape(text) - if '$' not in s and '<' not in s and '&' not in s: + if "$" not in s and "<" not in s and "&" not in s: return sum(TextLength.approximate_char_width_em(c) for c in s) - parts = re.split(r'(\$\$.*?\$\$)|(\$.*?\$)', s) + parts = re.split(r"(\$\$.*?\$\$)|(\$.*?\$)", s) total = 0.0 for part in parts: if part is None: continue - if part.startswith('$$') and part.endswith('$$'): + if part.startswith("$$") and part.endswith("$$"): total += TextLength.estimate_math_width(part[2:-2]) - elif part.startswith('$') and part.endswith('$'): + elif part.startswith("$") and part.endswith("$"): total += TextLength.estimate_math_width(part[1:-1]) else: visible = strip_html_tags(part) @@ -256,10 +390,10 @@ class TextLength: @staticmethod def estimate_math_width(tex: str) -> float: - tokens = re.findall(r'\\[a-zA-Z]+|[a-zA-Z0-9]|.', tex) + tokens = re.findall(r"\\[a-zA-Z]+|[a-zA-Z0-9]|.", tex) width = 0.0 for tok in tokens: - if tok.startswith('\\'): + if tok.startswith("\\"): name = tok[1:] if name in TextLength.TEX_SIMPLE_GLYPHS: width += 0.6 @@ -269,9 +403,9 @@ class TextLength: width += 0.4 else: width += 1.0 # unknown control sequences - elif tok in '{}': + elif tok in "{}": continue # grouping only - elif tok in '^_': + elif tok in "^_": width += 0.3 # assume sub/superscript takes some space else: width += TextLength.approximate_char_width_em(tok) @@ -321,12 +455,13 @@ class TextLength: class Sparsify: """Sparsify multiindex rows and columns.""" + @staticmethod def sparsify(df, cs): out = df.copy() for i, c in enumerate(cs): - mask = df[cs[:i + 1]].ne(df[cs[:i + 1]].shift()).any(axis=1) - out.loc[~mask, c] = '' + mask = df[cs[: i + 1]].ne(df[cs[: i + 1]].shift()).any(axis=1) + out.loc[~mask, c] = "" return out @staticmethod @@ -343,7 +478,7 @@ class Sparsify: rules = [] for k, v in enumerate(new_col[1:]): if v == last and not bottom_level: - new_col[k + 1] = '' + new_col[k + 1] = "" else: last = v rules.append(k + 1) @@ -353,6 +488,7 @@ class Sparsify: class Indexing: """Changed column and level from a multi-index.""" + @staticmethod def changed_column(bit): """Return the column that changes with each row.""" @@ -420,7 +556,7 @@ class Width: True if any word is broken across lines, False otherwise. """ nonlocal num_lines - wrapped_lines = wrap(text, width=width) + wrapped_lines = wrap(text, width=width) if width else text num_lines = len(wrapped_lines) original_words = text.split() @@ -443,8 +579,13 @@ class Width: # First pass: avoid ugly intraword breaks # make dict of col -> longest word length - min_acceptable = {c: v for c, v in - zip(colnames, map(lambda x: max(len(i) for i in re.split(r'[ \-/]', x)), colnames))} + min_acceptable = { + c: v + for c, v in zip( + colnames, + map(lambda x: max(len(i) for i in re.split(r"[ \-/]", x)), colnames), + ) + } options = [] for col in colnames: if not isinstance(col, str): @@ -478,21 +619,25 @@ class Width: # display(config.debug) # make df[col name, amount of extra space for col, resulting number of lines] # this is needed as input for the optimal heading function (next) - input_df = pd.DataFrame(options, columns=['col', 'extra', 'num_lines']) + input_df = pd.DataFrame(options, columns=["col", "extra", "num_lines"]) # min amount to avoid intra work breaks - avoid_intra = input_df.groupby('col').min().extra.sum() + avoid_intra = input_df.groupby("col").min().extra.sum() if avoid_intra >= space: # that's all we can do - logger.warning("Insufficient space to avoid ugly wraps -> NO FURTHER IMPROVEMENTS") + logger.warning( + "Insufficient space to avoid ugly wraps -> NO FURTHER IMPROVEMENTS" + ) else: # can try for a better solution sol = Width.optimal_heading(input_df, space) adjustments.update(sol[1]) - logger.info('best solution: %s', sol) + logger.info("best solution: %s", sol) return adjustments @staticmethod - def optimal_heading(input_df: pd.DataFrame, total_es_budget: int) -> tuple[int, dict[str, int]]: + def optimal_heading( + input_df: pd.DataFrame, total_es_budget: int + ) -> tuple[int, dict[str, int]]: """ Optimize extra config.spacing for best heading. @@ -516,19 +661,19 @@ class Width: """ # Pre-processing - unique_cols = input_df['col'].unique().tolist() + unique_cols = input_df["col"].unique().tolist() col_extra_num_lines_options = {} for col_name in unique_cols: - col_data = input_df[input_df['col'] == - col_name].sort_values(by='extra') + col_data = input_df[input_df["col"] == col_name].sort_values(by="extra") col_extra_num_lines_options[col_name] = list( - zip(col_data['extra'], col_data['num_lines'])) + zip(col_data["extra"], col_data["num_lines"]) + ) def check(target_max_lines: int) -> bool: current_extra_needed = 0 for col_name in unique_cols: - min_extra_for_col = float('inf') + min_extra_for_col = float("inf") found_suitable_extra = False for extra_val, num_lines_val in col_extra_num_lines_options[col_name]: if num_lines_val <= target_max_lines: @@ -543,7 +688,7 @@ class Width: return current_extra_needed <= total_es_budget - all_num_lines = input_df['num_lines'].unique() + all_num_lines = input_df["num_lines"].unique() # Corrected line: Check length of the numpy array if len(all_num_lines) == 0: @@ -562,7 +707,7 @@ class Width: temp_current_allocation = {} possible = True for col_name in unique_cols: - min_extra_for_col = float('inf') + min_extra_for_col = float("inf") found_suitable_extra = False for extra_val, num_lines_val in col_extra_num_lines_options[col_name]: if num_lines_val <= mid_max_lines: @@ -597,7 +742,7 @@ class TextOutput: data_col_aligns: list[str], *, index_levels: int = 1, - fmt: TableFormat = GT_Format + fmt: TableFormat = GT_Format, ) -> str: """ Render self.df as a wrapped, boxed table. @@ -622,21 +767,25 @@ class TextOutput: def _write_line(line: str) -> None: """Writes a line to the buffer followed by a newline.""" - buf.write(line + '\n') + buf.write(line + "\n") def _format_cell(text: str, width: int, align: str) -> list[str]: """ Formats a single cell, wrapping text and applying padding and alignment. Returns a list of strings, each representing a line of the cell. """ - lines = wrap(str(text), width=width) or [''] + lines = wrap(str(text), width=width) or [""] padded_width = width + 2 * fmt.padding return [ (" " * fmt.padding) - + (line.ljust(width) if align == 'left' - else line.center(width) if align == 'center' - else line.rjust(width)) + - (" " * fmt.padding) + + ( + line.ljust(width) + if align == "left" + else line.center(width) + if align == "center" + else line.rjust(width) + ) + + (" " * fmt.padding) for line in lines ] @@ -663,41 +812,46 @@ class TextOutput: parts.append(cell) return f"{row_fmt.begin}{''.join(parts)}{row_fmt.end}" - def _render_header_level(wrapped_cells: list[list[str]], level_widths: list[int]) -> list[str]: + def _render_header_level( + wrapped_cells: list[list[str]], level_widths: list[int] + ) -> list[str]: """ Renders a single level of the header, ensuring cells are bottom-aligned. Returns a list of strings, each representing a line of the header. """ max_height = max(len(c) for c in wrapped_cells) padded_cells = [ - [' ' * (w + 2 * fmt.padding)] * (max_height - len(cell)) + cell + [" " * (w + 2 * fmt.padding)] * (max_height - len(cell)) + cell for cell, w in zip(wrapped_cells, level_widths) ] - return [_make_data_row(fmt.headerrow, [col[i] for col in padded_cells]) for i in range(max_height)] + return [ + _make_data_row(fmt.headerrow, [col[i] for col in padded_cells]) + for i in range(max_height) + ] col_levels = df.columns.nlevels - col_tuples = df.columns if col_levels > 1 else [ - (c,) for c in df.columns] + col_tuples = df.columns if col_levels > 1 else [(c,) for c in df.columns] # Step 1: format each level of the column headers (one header line per level) # header alignment is left in index and center in body index_col_aligns = [ - 'left' if i < index_levels else 'center' for i in range(len(data_col_aligns))] + "left" if i < index_levels else "center" + for i in range(len(data_col_aligns)) + ] _write_line(_make_horizontal_line(fmt.lineabove, data_col_widths)) # collect all wrapped + bottom-aligned rows for each level for level in range(col_levels): - level_texts = [str(t[level] if level < len(t) else '') - for t in col_tuples] - wrapped_cells = [_format_cell(txt, w, a) for txt, w, a in zip( - level_texts, data_col_widths, index_col_aligns)] + level_texts = [str(t[level] if level < len(t) else "") for t in col_tuples] + wrapped_cells = [ + _format_cell(txt, w, a) + for txt, w, a in zip(level_texts, data_col_widths, index_col_aligns) + ] level_rows = _render_header_level(wrapped_cells, data_col_widths) for row in level_rows: _write_line(row) if level < col_levels - 1: - _write_line(_make_horizontal_line( - fmt.linebetweenrows, data_col_widths)) - _write_line(_make_horizontal_line( - fmt.linebelowheader, data_col_widths)) + _write_line(_make_horizontal_line(fmt.linebetweenrows, data_col_widths)) + _write_line(_make_horizontal_line(fmt.linebelowheader, data_col_widths)) for row_idx, (_, row) in enumerate(df.iterrows()): data_cells = [ @@ -706,19 +860,16 @@ class TextOutput: ] max_height = max(len(c) for c in data_cells) padded = [ - c + [' ' * (w + 2 * fmt.padding)] * (max_height - len(c)) + c + [" " * (w + 2 * fmt.padding)] * (max_height - len(c)) for c, w in zip(data_cells, data_col_widths) ] for i in range(max_height): - _write_line(_make_data_row( - fmt.datarow, [col[i] for col in padded])) + _write_line(_make_data_row(fmt.datarow, [col[i] for col in padded])) if row_idx < len(df) - 1: - _write_line(_make_horizontal_line( - fmt.linebetweenrows, data_col_widths)) + _write_line(_make_horizontal_line(fmt.linebetweenrows, data_col_widths)) else: - _write_line(_make_horizontal_line( - fmt.linebelow, data_col_widths)) + _write_line(_make_horizontal_line(fmt.linebelow, data_col_widths)) return buf.getvalue() @@ -751,19 +902,16 @@ class RichOutput: colnames = list(df.columns) if isinstance(column_widths, list): - column_widths = {colnames[i]: w for i, - w in enumerate(column_widths)} + column_widths = {colnames[i]: w for i, w in enumerate(column_widths)} if column_alignments is None: column_alignments = {} elif isinstance(column_alignments, list): column_alignments = { - colnames[i]: a for i, a in enumerate(column_alignments)} + colnames[i]: a for i, a in enumerate(column_alignments) + } - table = Table(title=title, - box=box_style, - show_lines=show_lines, - expand=True) + table = Table(title=title, box=box_style, show_lines=show_lines, expand=True) for i, col in enumerate(colnames): is_index = i < num_index_columns @@ -785,14 +933,33 @@ class RichOutput: return table -class SmartTitle(): +class SmartTitle: """Support reasonable Title case for text.""" - # TODO: Implement smart titling! + + # TODO: Implement smart titling! @staticmethod def smart_title(text): """Slightly smart title capitalization (GPT4o).""" - small_words = {"a", "an", "and", "as", "at", "but", "by", "for", - "in", "is", "of", "on", "or", "the", "to", "up", "via", "vs"} + small_words = { + "a", + "an", + "and", + "as", + "at", + "but", + "by", + "for", + "in", + "is", + "of", + "on", + "or", + "the", + "to", + "up", + "via", + "vs", + } words = text.split() result = [] diff --git a/gt-testers.ipynb b/gt-testers.ipynb new file mode 100644 index 0000000..d45062f --- /dev/null +++ b/gt-testers.ipynb @@ -0,0 +1,4098 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "140b253d-e998-4440-a540-6e30abebb1b5", + "metadata": {}, + "source": [ + "# Greater Tables Testers\n", + "## Provenance\n", + "* Created new: 2025-06-06" + ] + }, + { + "cell_type": "code", + "execution_count": 1, + "id": "f733e11c-9165-4bb8-9dc5-a4ba0c6b556a", + "metadata": {}, + "outputs": [], + "source": [ + "from greater_tables import GT\n", + "import greater_tables.utilities as gtu\n", + "import greater_tables.test_tables as gtt\n", + "import scratch as sc" + ] + }, + { + "cell_type": "code", + "execution_count": 2, + "id": "dfa32d92-e4c3-430f-b5be-9f8ab3cb74b5", + "metadata": {}, + "outputs": [], + "source": [ + "tdf = gtu.TestDFGenerator()\n", + "ts = tdf.test_suite()" + ] + }, + { + "cell_type": "code", + "execution_count": 18, + "id": "1224b554-c80e-4ca4-a34a-b51bdf41ec07", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
floats dates filenames
currency estimatereference timestamp transaction supplierestimatecategory duration user expense ratio
8,859.5372000-12-125,597.0442,045
6,390.1632021-09-223,810
3,536.1532020-08-112,825.8544,862
6,812.9862015-03-169,982.1223,642
9,730.5742011-07-055,179.8223,102
" + ], + "text/latex": [ + "\n", + "\\begin{table}\n", + "\\caption{floats dates filenames}\n", + "\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=5.40em},\n", + "\tcolumn 2/.style={nodes={align=left }, nosep, text width=6.60em},\n", + "\tcolumn 3/.style={nodes={align=left }, nosep, text width=5.40em},\n", + "\tcolumn 4/.style={nodes={align=left }, nosep, text width=4.80em},\n", + "\tcolumn 5/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TSXEYJZS4F67Y) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\\\\n", + " currency estimate\\grtspacer \\& reference timestamp transaction supplier\\grtspacer \\& estimate\\grtspacer \\& category duration user expense ratio\\grtspacer \\& \\\\\n", + " 8,859.537 \\& 2000-12-12 \\& 5,597.044 \\& 2,045 \\& \\\\\n", + " 6,390.163 \\& 2021-09-22 \\& \\& 3,810 \\& \\\\\n", + " 3,536.153 \\& 2020-08-11 \\& 2,825.854 \\& 4,862 \\& \\\\\n", + " 6,812.986 \\& 2015-03-16 \\& 9,982.122 \\& 3,642 \\& \\\\\n", + " 9,730.574 \\& 2011-07-05 \\& 5,179.822 \\& 3,102 \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TSXEYJZS4F67Y-1-1.south west) -- (TSXEYJZS4F67Y-1-5.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TSXEYJZS4F67Y-2-1.south west) -- ([yshift=-0.0625em]TSXEYJZS4F67Y-2-5.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TSXEYJZS4F67Y-7-1.base west) -- ([yshift=-0.3125em]TSXEYJZS4F67Y-7-5.base east);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n" + ], + "text/plain": [ + "GreaterTable(df_id=TSXEYJZS4F67Y)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
dense text and numbers
location reference transactionemail loss date operationaccount type extension transaction combined ratioprocessing addresstransaction loss date failure duration locationexpense ratio identifier filename
transaction operation status filename timestamp location duration extension loss ratio remark account balance note project supplier currency user combined ratio client failure category4,857.9201,050comment status supplier type filename extension processing combined ratio identifier amount premium estimate transaction address location balance account loss date note duration2027-02-14
loss ratio amount timestamp loss date transaction note category extension remark type failure estimate location email premium supplier balance combined ratio account322.0393,135category loss ratio entry estimate operation type description premium timestamp failure duration2019-11-238,801.455
type currency address remark transaction identifier processing email filename supplier loss ratio location comment failure timestamp7,236.9053,228supplier account project amount balance description processing reference note remark status currency loss ratio identifier entry2006-03-223,062.313
operation status processing expense ratio premium address identifier supplier timestamp duration currency balance location project category remark amount3,552.6012,771filename estimate extension description supplier amount identifier project expense ratio processing account2005-10-062,792.562
transaction extension expense ratio user reference operation note amount timestamp combined ratio estimate project premium description filename location4,779.972178note premium reference user amount category location entry extension duration description loss date timestamp address failure loss ratio client identifier estimate filename project account type currency2001-09-248,642.682
" + ], + "text/latex": [ + "\n", + "\\begin{table}\n", + "\\caption{dense text and numbers}\n", + "\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=110.40em},\n", + "\tcolumn 2/.style={nodes={align=left }, nosep, text width=5.40em},\n", + "\tcolumn 3/.style={nodes={align=left }, nosep, text width=6.60em},\n", + "\tcolumn 4/.style={nodes={align=left }, nosep, text width=121.20em},\n", + "\tcolumn 5/.style={nodes={align=left }, nosep, text width=6.60em},\n", + "\tcolumn 6/.style={nodes={align=left }, nosep, text width=6.00em},\n", + "\tcolumn 7/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TEV43N4TJRUB4) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\& \\& \\\\\n", + " location reference transaction\\grtspacer \\& email loss date operation\\grtspacer \\& account type extension transaction combined ratio\\grtspacer \\& processing address\\grtspacer \\& transaction loss date failure duration location\\grtspacer \\& expense ratio identifier filename\\grtspacer \\& \\\\\n", + " transaction operation status filename timestamp location duration extension loss ratio remark account balance note project supplier currency user combined ratio client failure category \\& 4,857.920 \\& 1,050 \\& comment status supplier type filename extension processing combined ratio identifier amount premium estimate transaction address location balance account loss date note duration \\& 2027-02-14 \\& \\& \\\\\n", + " loss ratio amount timestamp loss date transaction note category extension remark type failure estimate location email premium supplier balance combined ratio account \\& 322.039 \\& 3,135 \\& category loss ratio entry estimate operation type description premium timestamp failure duration \\& 2019-11-23 \\& 8,801.455 \\& \\\\\n", + " type currency address remark transaction identifier processing email filename supplier loss ratio location comment failure timestamp \\& 7,236.905 \\& 3,228 \\& supplier account project amount balance description processing reference note remark status currency loss ratio identifier entry \\& 2006-03-22 \\& 3,062.313 \\& \\\\\n", + " operation status processing expense ratio premium address identifier supplier timestamp duration currency balance location project category remark amount \\& 3,552.601 \\& 2,771 \\& filename estimate extension description supplier amount identifier project expense ratio processing account \\& 2005-10-06 \\& 2,792.562 \\& \\\\\n", + " transaction extension expense ratio user reference operation note amount timestamp combined ratio estimate project premium description filename location \\& 4,779.972 \\& 178 \\& note premium reference user amount category location entry extension duration description loss date timestamp address failure loss ratio client identifier estimate filename project account type currency \\& 2001-09-24 \\& 8,642.682 \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TEV43N4TJRUB4-1-1.south west) -- (TEV43N4TJRUB4-1-7.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TEV43N4TJRUB4-2-1.south west) -- ([yshift=-0.0625em]TEV43N4TJRUB4-2-7.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TEV43N4TJRUB4-7-1.base west) -- ([yshift=-0.3125em]TEV43N4TJRUB4-7-7.base east);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n" + ], + "text/plain": [ + "GreaterTable(df_id=TEV43N4TJRUB4)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
mixed data with missing
note type estimate statusoperation descriptionlocationaddress currency durationamount address account estimate client
2,0262006-07-04amount_estimate_type_loss ratio_reference.pdf
client supplier balance loss date expense ratio identifier operation email entry loss ratio address comment extension project processing3,057type_note_entry_extension.pdf
3,128.995note timestamp supplier email address status transaction loss ratio extension operation description filename client comment loss date expense ratio premium remark categorypremium_amount_entry.pdf
type estimate note balance email loss ratio description location identifier amount currency category extension entry project combined ratio timestamp2007-05-21extension_identifier_account.pdf
6,976.716amount category user failure status entry estimate balance type email comment processing location operation currency extension2,6542004-09-13
" + ], + "text/latex": [ + "\n", + "\\begin{table}\n", + "\\caption{mixed data with missing}\n", + "\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=5.40em},\n", + "\tcolumn 2/.style={nodes={align=left }, nosep, text width=102.60em},\n", + "\tcolumn 3/.style={nodes={align=left }, nosep, text width=4.80em},\n", + "\tcolumn 4/.style={nodes={align=left }, nosep, text width=6.00em},\n", + "\tcolumn 5/.style={nodes={align=left }, nosep, text width=27.00em},\n", + "\tcolumn 6/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TV5PU4PMJQ5AL) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\& \\\\\n", + " note type estimate status\\grtspacer \\& operation description\\grtspacer \\& location\\grtspacer \\& address currency duration\\grtspacer \\& amount address account estimate client\\grtspacer \\& \\\\\n", + " \\& \\& 2,026 \\& 2006-07-04 \\& amount_estimate_type_loss ratio_reference.pdf \\& \\\\\n", + " \\& client supplier balance loss date expense ratio identifier operation email entry loss ratio address comment extension project processing \\& 3,057 \\& \\& type_note_entry_extension.pdf \\& \\\\\n", + " 3,128.995 \\& note timestamp supplier email address status transaction loss ratio extension operation description filename client comment loss date expense ratio premium remark category \\& \\& \\& premium_amount_entry.pdf \\& \\\\\n", + " \\& type estimate note balance email loss ratio description location identifier amount currency category extension entry project combined ratio timestamp \\& \\& 2007-05-21 \\& extension_identifier_account.pdf \\& \\\\\n", + " 6,976.716 \\& amount category user failure status entry estimate balance type email comment processing location operation currency extension \\& 2,654 \\& 2004-09-13 \\& \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TV5PU4PMJQ5AL-1-1.south west) -- (TV5PU4PMJQ5AL-1-6.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TV5PU4PMJQ5AL-2-1.south west) -- ([yshift=-0.0625em]TV5PU4PMJQ5AL-2-6.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TV5PU4PMJQ5AL-7-1.base west) -- ([yshift=-0.3125em]TV5PU4PMJQ5AL-7-6.base east);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n" + ], + "text/plain": [ + "GreaterTable(df_id=TV5PU4PMJQ5AL)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
long header names
Detailed Instrumentation Configuration SummaryArchive Metadata Extraction Date FieldOverview Record Approximation NotesVelocity Gradient Approximation FloatPressure Summary Int Field
expense ratio email operation type balance timestamp premium identifier duration loss date2026-05-14user filename transaction extension premium status category comment combined ratio operation timestamp type entry address8,183.384934
project comment remark address transaction location identifier currency balance description expense ratio note type duration amount supplier2001-11-08failure transaction status timestamp address premium expense ratio user note extension remark currency identifier category operation1,280.8082,692
premium email estimate reference transaction extension project note description combined ratio balance filename location status identifier expense ratio supplier category type client entry timestamp loss ratio failure processing2015-07-16email status processing amount note project extension account description user address failure expense ratio filename category transaction premium entry loss ratio estimate supplier remark combined ratio reference location9,362.2974,033
estimate reference failure amount identifier filename email combined ratio loss date comment2022-10-18type address account location reference supplier currency processing identifier balance failure category timestamp combined ratio transaction9,161.457285
reference entry email currency description account supplier identifier premium location combined ratio2016-07-10address operation transaction email failure extension project note currency expense ratio reference timestamp processing2,059.8823,151
" + ], + "text/latex": [ + "\n", + "\\begin{table}\n", + "\\caption{long header names}\n", + "\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=136.80em},\n", + "\tcolumn 2/.style={nodes={align=left }, nosep, text width=6.00em},\n", + "\tcolumn 3/.style={nodes={align=left }, nosep, text width=133.20em},\n", + "\tcolumn 4/.style={nodes={align=left }, nosep, text width=7.80em},\n", + "\tcolumn 5/.style={nodes={align=left }, nosep, text width=4.80em},\n", + "\tcolumn 6/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TH235NQCO5NMR) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\& \\\\\n", + " Detailed Instrumentation Configuration Summary\\grtspacer \\& Archive Metadata Extraction Date Field\\grtspacer \\& Overview Record Approximation Notes\\grtspacer \\& Velocity Gradient Approximation Float\\grtspacer \\& Pressure Summary Int Field\\grtspacer \\& \\\\\n", + " expense ratio email operation type balance timestamp premium identifier duration loss date \\& 2026-05-14 \\& user filename transaction extension premium status category comment combined ratio operation timestamp type entry address \\& 8,183.384 \\& 934 \\& \\\\\n", + " project comment remark address transaction location identifier currency balance description expense ratio note type duration amount supplier \\& 2001-11-08 \\& failure transaction status timestamp address premium expense ratio user note extension remark currency identifier category operation \\& 1,280.808 \\& 2,692 \\& \\\\\n", + " premium email estimate reference transaction extension project note description combined ratio balance filename location status identifier expense ratio supplier category type client entry timestamp loss ratio failure processing \\& 2015-07-16 \\& email status processing amount note project extension account description user address failure expense ratio filename category transaction premium entry loss ratio estimate supplier remark combined ratio reference location \\& 9,362.297 \\& 4,033 \\& \\\\\n", + " estimate reference failure amount identifier filename email combined ratio loss date comment \\& 2022-10-18 \\& type address account location reference supplier currency processing identifier balance failure category timestamp combined ratio transaction \\& 9,161.457 \\& 285 \\& \\\\\n", + " reference entry email currency description account supplier identifier premium location combined ratio \\& 2016-07-10 \\& address operation transaction email failure extension project note currency expense ratio reference timestamp processing \\& 2,059.882 \\& 3,151 \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TH235NQCO5NMR-1-1.south west) -- (TH235NQCO5NMR-1-6.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TH235NQCO5NMR-2-1.south west) -- ([yshift=-0.0625em]TH235NQCO5NMR-2-6.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TH235NQCO5NMR-7-1.base west) -- ([yshift=-0.3125em]TH235NQCO5NMR-7-6.base east);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n" + ], + "text/plain": [ + "GreaterTable(df_id=TH235NQCO5NMR)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
file-centric record
category entry project emaillocation balance premium usercommentsupplier operation filename description currencycomment estimate premiumreference suppliertype
category_note_currency.pdf2024-08-15project amount email loss date account entry status user reference supplier location loss ratio description type processing failure combined ratio filename premium transaction timestamp remark expense ratio comment8,154.1443,7502007-10-31
failure_loss ratio_expense ratio_timestamp_type.pdf2001-02-13expense ratio identifier processing filename amount client timestamp remark account location project estimate loss ratio failure transaction user operation balance type currency3,608.8164352008-09-26processing_loss ratio_category.pdf
loss date_loss ratio_amount_remark_filename.pdf2002-08-23processing user supplier premium identifier transaction amount email comment extension loss date combined ratio failure address entry estimate project balance note operation timestamp description reference type5,306.7829532002-09-10
filename_currency_balance.pdf2015-04-01currency address reference location project operation premium email remark note extension comment account amount filename balance category entry loss ratio failure identifier type processing5,628.4583,6412001-07-21amount_supplier.pdf
note_category_loss date_duration_currency.pdf2019-07-06failure loss ratio combined ratio currency user address expense ratio status premium identifier loss date location account note reference email remark supplier project type6,697.8234,9752007-05-09entry_balance_address.pdf
" + ], + "text/latex": [ + "\n", + "\\begin{table}\n", + "\\caption{file-centric record}\n", + "\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=30.60em},\n", + "\tcolumn 2/.style={nodes={align=left }, nosep, text width=6.00em},\n", + "\tcolumn 3/.style={nodes={align=left }, nosep, text width=128.40em},\n", + "\tcolumn 4/.style={nodes={align=left }, nosep, text width=6.60em},\n", + "\tcolumn 5/.style={nodes={align=left }, nosep, text width=4.80em},\n", + "\tcolumn 6/.style={nodes={align=left }, nosep, text width=6.00em},\n", + "\tcolumn 7/.style={nodes={align=left }, nosep, text width=20.40em},\n", + "\tcolumn 8/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (T2TFTFBFALI7E) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\& \\& \\& \\\\\n", + " category entry project email\\grtspacer \\& location balance premium user\\grtspacer \\& comment\\grtspacer \\& supplier operation filename description currency\\grtspacer \\& comment estimate premium\\grtspacer \\& reference supplier\\grtspacer \\& type\\grtspacer \\& \\\\\n", + " category_note_currency.pdf \\& 2024-08-15 \\& project amount email loss date account entry status user reference supplier location loss ratio description type processing failure combined ratio filename premium transaction timestamp remark expense ratio comment \\& 8,154.144 \\& 3,750 \\& 2007-10-31 \\& \\& \\\\\n", + " failure_loss ratio_expense ratio_timestamp_type.pdf \\& 2001-02-13 \\& expense ratio identifier processing filename amount client timestamp remark account location project estimate loss ratio failure transaction user operation balance type currency \\& 3,608.816 \\& 435 \\& 2008-09-26 \\& processing_loss ratio_category.pdf \\& \\\\\n", + " loss date_loss ratio_amount_remark_filename.pdf \\& 2002-08-23 \\& processing user supplier premium identifier transaction amount email comment extension loss date combined ratio failure address entry estimate project balance note operation timestamp description reference type \\& 5,306.782 \\& 953 \\& 2002-09-10 \\& \\& \\\\\n", + " filename_currency_balance.pdf \\& 2015-04-01 \\& currency address reference location project operation premium email remark note extension comment account amount filename balance category entry loss ratio failure identifier type processing \\& 5,628.458 \\& 3,641 \\& 2001-07-21 \\& amount_supplier.pdf \\& \\\\\n", + " note_category_loss date_duration_currency.pdf \\& 2019-07-06 \\& failure loss ratio combined ratio currency user address expense ratio status premium identifier loss date location account note reference email remark supplier project type \\& 6,697.823 \\& 4,975 \\& 2007-05-09 \\& entry_balance_address.pdf \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (T2TFTFBFALI7E-1-1.south west) -- (T2TFTFBFALI7E-1-8.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]T2TFTFBFALI7E-2-1.south west) -- ([yshift=-0.0625em]T2TFTFBFALI7E-2-8.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]T2TFTFBFALI7E-7-1.base west) -- ([yshift=-0.3125em]T2TFTFBFALI7E-7-8.base east);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n" + ], + "text/plain": [ + "GreaterTable(df_id=T2TFTFBFALI7E)" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "dfs = gtt.make_dataframe_set(5)\n", + "for k, v in dfs.items():\n", + " display(GT(v, caption=k, show_index=False))" + ] + }, + { + "cell_type": "code", + "execution_count": 15, + "id": "01f627b5-22b9-45d1-9833-0afdc497fd7e", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
indexConsideration of ConsequencesProbabilityExpected Value
0A rather long text value that could wrap badly.LikelyHigh
1ShortUnlikelyLow
2A second problematic entry with spaces.ModerateModerate
" + ], + "text/latex": [ + "\n", + "\\begin{table}\n", + "% caption placeholder\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=3.00em},\n", + "\tcolumn 2/.style={nodes={align=left }, nosep, text width=28.20em},\n", + "\tcolumn 3/.style={nodes={align=left }, nosep, text width=6.60em},\n", + "\tcolumn 4/.style={nodes={align=left }, nosep, text width=4.80em},\n", + "\tcolumn 5/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TW3YUZ36SFQ35) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\\\\n", + " index\\grtspacer \\& Consideration of Consequences\\grtspacer \\& Probability\\grtspacer \\& Expected Value\\grtspacer \\& \\\\\n", + " 0 \\& A rather long text value that could wrap badly. \\& Likely \\& High \\& \\\\\n", + " 1 \\& Short \\& Unlikely \\& Low \\& \\\\\n", + " 2 \\& A second problematic entry with spaces. \\& Moderate \\& Moderate \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TW3YUZ36SFQ35-1-1.south west) -- (TW3YUZ36SFQ35-1-5.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TW3YUZ36SFQ35-2-1.south west) -- ([yshift=-0.0625em]TW3YUZ36SFQ35-2-5.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TW3YUZ36SFQ35-5-1.base west) -- ([yshift=-0.3125em]TW3YUZ36SFQ35-5-5.base east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em]TW3YUZ36SFQ35-1-2.south west) -- ([yshift=-0.3125em, xshift=-0.1875em]TW3YUZ36SFQ35-5-2.base west);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n" + ], + "text/plain": [ + "GreaterTable(df_id=TW3YUZ36SFQ35)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
indexevent_datetimestamptransaction_code
02024-12-282024-12-28T14:23:00ABC-1001-ZZ
12025-01-052025-01-05T09:12:45XYZ-2048-AA
22031-06-212031-06-21T23:59:59LONG-CODE-2025-EXTREME
" + ], + "text/latex": [ + "\n", + "\\begin{table}\n", + "% caption placeholder\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=3.00em},\n", + "\tcolumn 2/.style={nodes={align=left }, nosep, text width=6.60em},\n", + "\tcolumn 3/.style={nodes={align=left }, nosep, text width=11.40em},\n", + "\tcolumn 4/.style={nodes={align=left }, nosep, text width=13.20em},\n", + "\tcolumn 5/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TODI5JTUWIHSZ) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\\\\n", + " index\\grtspacer \\& event\\_date\\grtspacer \\& timestamp\\grtspacer \\& transaction\\_code\\grtspacer \\& \\\\\n", + " 0 \\& 2024-12-28 \\& 2024-12-28T14:23:00 \\& ABC-1001-ZZ \\& \\\\\n", + " 1 \\& 2025-01-05 \\& 2025-01-05T09:12:45 \\& XYZ-2048-AA \\& \\\\\n", + " 2 \\& 2031-06-21 \\& 2031-06-21T23:59:59 \\& LONG-CODE-2025-EXTREME \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TODI5JTUWIHSZ-1-1.south west) -- (TODI5JTUWIHSZ-1-5.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TODI5JTUWIHSZ-2-1.south west) -- ([yshift=-0.0625em]TODI5JTUWIHSZ-2-5.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TODI5JTUWIHSZ-5-1.base west) -- ([yshift=-0.3125em]TODI5JTUWIHSZ-5-5.base east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em]TODI5JTUWIHSZ-1-2.south west) -- ([yshift=-0.3125em, xshift=-0.1875em]TODI5JTUWIHSZ-5-2.base west);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n" + ], + "text/plain": [ + "GreaterTable(df_id=TODI5JTUWIHSZ)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
indexnotesstatuspath
0Item 1: delivered; ready for invoice./usr/local/bin/run.sh
1Warning -- unit may be faulty?C:\\Program Files\\App\\main.exe
2Check: power supply (see page 42)~/Documents/projects/final-report.pdf
" + ], + "text/latex": [ + "\n", + "\\begin{table}\n", + "% caption placeholder\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=3.00em},\n", + "\tcolumn 2/.style={nodes={align=left }, nosep, text width=22.20em},\n", + "\tcolumn 3/.style={nodes={align=left }, nosep, text width=3.60em},\n", + "\tcolumn 4/.style={nodes={align=left }, nosep, text width=22.20em},\n", + "\tcolumn 5/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TGGNTAGJXWXGX) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\\\\n", + " index\\grtspacer \\& notes\\grtspacer \\& status\\grtspacer \\& path\\grtspacer \\& \\\\\n", + " 0 \\& Item 1: delivered; ready for invoice. \\& ✓ \\& /usr/local/bin/run.sh \\& \\\\\n", + " 1 \\& Warning -- unit may be faulty? \\& ✗ \\& C:\\Program Files\\App\\main.exe \\& \\\\\n", + " 2 \\& Check: power supply (see page 42) \\& ↺ \\& ~/Documents/projects/final-report.pdf \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TGGNTAGJXWXGX-1-1.south west) -- (TGGNTAGJXWXGX-1-5.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TGGNTAGJXWXGX-2-1.south west) -- ([yshift=-0.0625em]TGGNTAGJXWXGX-2-5.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TGGNTAGJXWXGX-5-1.base west) -- ([yshift=-0.3125em]TGGNTAGJXWXGX-5-5.base east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em]TGGNTAGJXWXGX-1-2.south west) -- ([yshift=-0.3125em, xshift=-0.1875em]TGGNTAGJXWXGX-5-2.base west);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n" + ], + "text/plain": [ + "GreaterTable(df_id=TGGNTAGJXWXGX)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
indexSerialMD5 HashUnwrapped
0A123B456a5c3e1d7f2b9c3d6f1e4a9b3c7d1e2f3SingleLineValue
1X987Y6549f1c4d3e7a6b2d5c8e3f9a1b7c6d4e5fAnotherOne
2Z000Z111ffb1a2c3d4e5f67890123456789abcdefNoBreaksHere
" + ], + "text/latex": [ + "\n", + "\\begin{table}\n", + "% caption placeholder\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=3.00em},\n", + "\tcolumn 2/.style={nodes={align=left }, nosep, text width=4.80em},\n", + "\tcolumn 3/.style={nodes={align=left }, nosep, text width=19.80em},\n", + "\tcolumn 4/.style={nodes={align=left }, nosep, text width=9.00em},\n", + "\tcolumn 5/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TFSJLV4XGAZKI) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\\\\n", + " index\\grtspacer \\& Serial\\grtspacer \\& MD5 Hash\\grtspacer \\& Unwrapped\\grtspacer \\& \\\\\n", + " 0 \\& A123B456 \\& a5c3e1d7f2b9c3d6f1e4a9b3c7d1e2f3 \\& SingleLineValue \\& \\\\\n", + " 1 \\& X987Y654 \\& 9f1c4d3e7a6b2d5c8e3f9a1b7c6d4e5f \\& AnotherOne \\& \\\\\n", + " 2 \\& Z000Z111 \\& ffb1a2c3d4e5f67890123456789abcdef \\& NoBreaksHere \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TFSJLV4XGAZKI-1-1.south west) -- (TFSJLV4XGAZKI-1-5.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TFSJLV4XGAZKI-2-1.south west) -- ([yshift=-0.0625em]TFSJLV4XGAZKI-2-5.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TFSJLV4XGAZKI-5-1.base west) -- ([yshift=-0.3125em]TFSJLV4XGAZKI-5-5.base east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em]TFSJLV4XGAZKI-1-2.south west) -- ([yshift=-0.3125em, xshift=-0.1875em]TFSJLV4XGAZKI-5-2.base west);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n" + ], + "text/plain": [ + "GreaterTable(df_id=TFSJLV4XGAZKI)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
SimulationInputOutput
indexIDDate GeneratedModel NameParametersResult Summary
012024-11-15RiskModelV2α=0.95, β=3.2Stable. 5 iterations. RMSE=0.003
122025-02-04SuperModelα=0.99, β=2.1Converged quickly. RMSE=0.001
232026-08-12LongModelNameWithDetailsα=0.90, β=4.0, γ=1.0Diverged on step 4. RMSE=N/A
" + ], + "text/latex": [ + "\n", + "\\begin{table}\n", + "% caption placeholder\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\trow 3/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=3.00em},\n", + "\tcolumn 2/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 3/.style={nodes={align=left }, nosep, text width=6.00em},\n", + "\tcolumn 4/.style={nodes={align=left }, nosep, text width=14.40em},\n", + "\tcolumn 5/.style={nodes={align=left }, nosep, text width=12.00em},\n", + "\tcolumn 6/.style={nodes={align=left }, nosep, text width=19.20em},\n", + "\tcolumn 7/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TOK5IKTT4JQGC) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\& \\& \\\\\n", + " \\grtspacer \\& Simulation\\grtspacer \\& \\grtspacer \\& Input\\grtspacer \\& \\grtspacer \\& Output\\grtspacer \\& \\\\\n", + " index\\grtspacer \\& ID\\grtspacer \\& Date Generated\\grtspacer \\& Model Name\\grtspacer \\& Parameters\\grtspacer \\& Result Summary\\grtspacer \\& \\\\\n", + " 0 \\& 1 \\& 2024-11-15 \\& RiskModelV2 \\& α=0.95, β=3.2 \\& Stable. 5 iterations. RMSE=0.003 \\& \\\\\n", + " 1 \\& 2 \\& 2025-02-04 \\& SuperModel \\& α=0.99, β=2.1 \\& Converged quickly. RMSE=0.001 \\& \\\\\n", + " 2 \\& 3 \\& 2026-08-12 \\& LongModelNameWithDetails \\& α=0.90, β=4.0, γ=1.0 \\& Diverged on step 4. RMSE=N/A \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TOK5IKTT4JQGC-1-1.south west) -- (TOK5IKTT4JQGC-1-7.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TOK5IKTT4JQGC-3-1.south west) -- ([yshift=-0.0625em]TOK5IKTT4JQGC-3-7.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TOK5IKTT4JQGC-6-1.base west) -- ([yshift=-0.3125em]TOK5IKTT4JQGC-6-7.base east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em, yshift=-0.0625em]TOK5IKTT4JQGC-2-2.south west) -- ([yshift=-0.0625em]TOK5IKTT4JQGC-2-7.south east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em]TOK5IKTT4JQGC-1-2.south west) -- ([yshift=-0.3125em, xshift=-0.1875em]TOK5IKTT4JQGC-6-2.base west);\n", + "\\path[draw, ultra thin] ([xshift=0.1875em, yshift=-0.0625em]TOK5IKTT4JQGC-1-3.south east) -- ([yshift=-0.3125em, xshift=0.1875em]TOK5IKTT4JQGC-6-3.base east);\n", + "\\path[draw, ultra thin] ([xshift=0.1875em, yshift=-0.0625em]TOK5IKTT4JQGC-1-5.south east) -- ([yshift=-0.3125em, xshift=0.1875em]TOK5IKTT4JQGC-6-5.base east);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n" + ], + "text/plain": [ + "GreaterTable(df_id=TOK5IKTT4JQGC)" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "dfm = gtt.make_manual_tests()\n", + "for d in dfm:\n", + " display(GT(d))" + ] + }, + { + "cell_type": "code", + "execution_count": 11, + "id": "86032085-3794-4af9-bfd8-5357af200196", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
indexfailure status combined ratio project timestamp (str)client premium (int)email identifier description supplier (str)extension duration reference premium (str)category processing client (date)
0Finish interest possible executive.115.00Maintain song.Hundred police much.None
1Kid sound off author.nanInternational step success likely police.Old morning can.2016-07-18
2Mother nearly cover girl.9,817.00Check.Your huge another.2015-01-15
3Heavy doctor deal old purpose population cost listen.7,054.00Parent paper poor star professor several measure.Them development part own recent everything.2021-02-20
4Old between little either rise.9,834.00Student mind thus dog range.Any pretty suddenly.2018-05-17
5None218.00No serious significant degree same.Boy under beautiful news apply run.2021-07-29
6Able miss forget wish television future.5,314.00Drive research.Should buy him floor actually.2022-04-23
7Always left commercial social.2,382.00Yet watch land there just foot.Ago must manage turn where manage take to ready.2021-06-29
" + ], + "text/latex": [ + "\n", + "\\begin{table}\n", + "% caption placeholder\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=3.00em},\n", + "\tcolumn 2/.style={nodes={align=left }, nosep, text width=31.80em},\n", + "\tcolumn 3/.style={nodes={align=right }, nosep, text width=4.80em},\n", + "\tcolumn 4/.style={nodes={align=left }, nosep, text width=29.40em},\n", + "\tcolumn 5/.style={nodes={align=left }, nosep, text width=28.80em},\n", + "\tcolumn 6/.style={nodes={align=left }, nosep, text width=6.00em},\n", + "\tcolumn 7/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TFVI7QJNH5MTR) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\& \\& \\\\\n", + " index\\grtspacer \\& failure status combined ratio project timestamp (str)\\grtspacer \\& client premium (int)\\grtspacer \\& email identifier description supplier (str)\\grtspacer \\& extension duration reference premium (str)\\grtspacer \\& category processing client (date)\\grtspacer \\& \\\\\n", + " 0 \\& Finish interest possible executive. \\& 115.00 \\& Maintain song. \\& Hundred police much. \\& None \\& \\\\\n", + " 1 \\& Kid sound off author. \\& nan \\& International step success likely police. \\& Old morning can. \\& 2016-07-18 \\& \\\\\n", + " 2 \\& Mother nearly cover girl. \\& 9,817.00 \\& Check. \\& Your huge another. \\& 2015-01-15 \\& \\\\\n", + " 3 \\& Heavy doctor deal old purpose population cost listen. \\& 7,054.00 \\& Parent paper poor star professor several measure. \\& Them development part own recent everything. \\& 2021-02-20 \\& \\\\\n", + " 4 \\& Old between little either rise. \\& 9,834.00 \\& Student mind thus dog range. \\& Any pretty suddenly. \\& 2018-05-17 \\& \\\\\n", + " 5 \\& None \\& 218.00 \\& No serious significant degree same. \\& Boy under beautiful news apply run. \\& 2021-07-29 \\& \\\\\n", + " 6 \\& Able miss forget wish television future. \\& 5,314.00 \\& Drive research. \\& Should buy him floor actually. \\& 2022-04-23 \\& \\\\\n", + " 7 \\& Always left commercial social. \\& 2,382.00 \\& Yet watch land there just foot. \\& Ago must manage turn where manage take to ready. \\& 2021-06-29 \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TFVI7QJNH5MTR-1-1.south west) -- (TFVI7QJNH5MTR-1-7.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TFVI7QJNH5MTR-2-1.south west) -- ([yshift=-0.0625em]TFVI7QJNH5MTR-2-7.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TFVI7QJNH5MTR-10-1.base west) -- ([yshift=-0.3125em]TFVI7QJNH5MTR-10-7.base east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em]TFVI7QJNH5MTR-1-2.south west) -- ([yshift=-0.3125em, xshift=-0.1875em]TFVI7QJNH5MTR-10-2.base west);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n" + ], + "text/plain": [ + "GreaterTable(df_id=TFVI7QJNH5MTR)" + ] + }, + "execution_count": 11, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "df = gtt.make_test_dataframe(8, 5)\n", + "f = GT(df, max_table_width=50)\n", + "f" + ] + }, + { + "cell_type": "code", + "execution_count": 14, + "id": "1f4ae417-7ed0-45f7-9da4-79ec3667f96a", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "\\begin{table}\n", + "% caption placeholder\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=3.00em},\n", + "\tcolumn 2/.style={nodes={align=left }, nosep, text width=31.80em},\n", + "\tcolumn 3/.style={nodes={align=right }, nosep, text width=4.80em},\n", + "\tcolumn 4/.style={nodes={align=left }, nosep, text width=29.40em},\n", + "\tcolumn 5/.style={nodes={align=left }, nosep, text width=28.80em},\n", + "\tcolumn 6/.style={nodes={align=left }, nosep, text width=6.00em},\n", + "\tcolumn 7/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TADRCD6DUU2DZ) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\& \\& \\\\\n", + " index\\grtspacer \\& failure status combined ratio project timestamp (str)\\grtspacer \\& client premium (int)\\grtspacer \\& email identifier description supplier (str)\\grtspacer \\& extension duration reference premium (str)\\grtspacer \\& category processing client (date)\\grtspacer \\& \\\\\n", + " 0 \\& Finish interest possible executive. \\& 115.00 \\& Maintain song. \\& Hundred police much. \\& None \\& \\\\\n", + " 1 \\& Kid sound off author. \\& nan \\& International step success likely police. \\& Old morning can. \\& 2016-07-18 \\& \\\\\n", + " 2 \\& Mother nearly cover girl. \\& 9,817.00 \\& Check. \\& Your huge another. \\& 2015-01-15 \\& \\\\\n", + " 3 \\& Heavy doctor deal old purpose population cost listen. \\& 7,054.00 \\& Parent paper poor star professor several measure. \\& Them development part own recent everything. \\& 2021-02-20 \\& \\\\\n", + " 4 \\& Old between little either rise. \\& 9,834.00 \\& Student mind thus dog range. \\& Any pretty suddenly. \\& 2018-05-17 \\& \\\\\n", + " 5 \\& None \\& 218.00 \\& No serious significant degree same. \\& Boy under beautiful news apply run. \\& 2021-07-29 \\& \\\\\n", + " 6 \\& Able miss forget wish television future. \\& 5,314.00 \\& Drive research. \\& Should buy him floor actually. \\& 2022-04-23 \\& \\\\\n", + " 7 \\& Always left commercial social. \\& 2,382.00 \\& Yet watch land there just foot. \\& Ago must manage turn where manage take to ready. \\& 2021-06-29 \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TADRCD6DUU2DZ-1-1.south west) -- (TADRCD6DUU2DZ-1-7.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TADRCD6DUU2DZ-2-1.south west) -- ([yshift=-0.0625em]TADRCD6DUU2DZ-2-7.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TADRCD6DUU2DZ-10-1.base west) -- ([yshift=-0.3125em]TADRCD6DUU2DZ-10-7.base east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em]TADRCD6DUU2DZ-1-2.south west) -- ([yshift=-0.3125em, xshift=-0.1875em]TADRCD6DUU2DZ-10-2.base west);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n", + "\n" + ] + } + ], + "source": [ + "f = GT(df, max_table_width=40)\n", + "print(f._repr_latex_())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "8a32a477-dd08-4f42-92e1-63c91557907d", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "id": "871ef69a-6cc6-4f3f-a766-8a4cf4291c85", + "metadata": {}, + "source": [ + "# HTML" + ] + }, + { + "cell_type": "code", + "execution_count": 4, + "id": "dc15f2fe-58e9-4618-9dcf-ab9dcdfa3302", + "metadata": {}, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
basic
discontinuanceboning floatcylinder floatgrassy datelurching datetimemonitoring datepleasantly intteaser yearweighing year
9433.2630.000002014-05-172022-03-212011-03-14-6,346.002,011.002,017
10,4245.3370.000032017-06-152009-10-132028-01-017,637.001,993.002,016
11,5820.2190.174782014-05-172018-11-022011-03-14-2,602.002,007.002,010
30,9460.0000.000042018-04-022011-04-242009-02-03-4,318.001,995.002,026
49,8570.0020.102292018-04-022018-11-022028-10-249,433.001,996.002,007
" + ], + "text/latex": [ + "\n", + "\\begin{table}\n", + "\\caption{basic}\n", + "\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=3.60em},\n", + "\tcolumn 2/.style={nodes={align=right }, nosep, text width=3.60em},\n", + "\tcolumn 3/.style={nodes={align=right }, nosep, text width=4.80em},\n", + "\tcolumn 4/.style={nodes={align=center}, nosep, text width=6.00em},\n", + "\tcolumn 5/.style={nodes={align=center}, nosep, text width=6.00em},\n", + "\tcolumn 6/.style={nodes={align=center}, nosep, text width=6.00em},\n", + "\tcolumn 7/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 8/.style={nodes={align=right }, nosep, text width=4.80em},\n", + "\tcolumn 9/.style={nodes={align=right }, nosep, text width=4.80em},\n", + "\tcolumn 10/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (T7XQCSCCKYWUR) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\& \\& \\& \\& \\& \\\\\n", + " discontinuance\\grtspacer \\& boning float\\grtspacer \\& cylinder float\\grtspacer \\& grassy date\\grtspacer \\& lurching datetime\\grtspacer \\& monitoring date\\grtspacer \\& pleasantly int\\grtspacer \\& teaser year\\grtspacer \\& weighing year\\grtspacer \\& \\\\\n", + " 943 \\& 3.263 \\& 0.00000 \\& 2014-05-17 \\& 2022-03-21 \\& 2011-03-14 \\& -6,346.00 \\& 2,011.00 \\& 2,017 \\& \\\\\n", + " 10,424 \\& 5.337 \\& 0.00003 \\& 2017-06-15 \\& 2009-10-13 \\& 2028-01-01 \\& 7,637.00 \\& 1,993.00 \\& 2,016 \\& \\\\\n", + " 11,582 \\& 0.219 \\& 0.17478 \\& 2014-05-17 \\& 2018-11-02 \\& 2011-03-14 \\& -2,602.00 \\& 2,007.00 \\& 2,010 \\& \\\\\n", + " 30,946 \\& 0.000 \\& 0.00004 \\& 2018-04-02 \\& 2011-04-24 \\& 2009-02-03 \\& -4,318.00 \\& 1,995.00 \\& 2,026 \\& \\\\\n", + " 49,857 \\& 0.002 \\& 0.10229 \\& 2018-04-02 \\& 2018-11-02 \\& 2028-10-24 \\& 9,433.00 \\& 1,996.00 \\& 2,007 \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (T7XQCSCCKYWUR-1-1.south west) -- (T7XQCSCCKYWUR-1-10.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]T7XQCSCCKYWUR-2-1.south west) -- ([yshift=-0.0625em]T7XQCSCCKYWUR-2-10.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]T7XQCSCCKYWUR-7-1.base west) -- ([yshift=-0.3125em]T7XQCSCCKYWUR-7-10.base east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em]T7XQCSCCKYWUR-1-2.south west) -- ([yshift=-0.3125em, xshift=-0.1875em]T7XQCSCCKYWUR-7-2.base west);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n" + ], + "text/plain": [ + "GreaterTable(df_id=T7XQCSCCKYWUR)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
timeseries
privatesSacramento Edgewise Outlive floatSooner Celled Complements floatSuperheroes Prejudge Carnivore datetime
2007-04-2425.87-803.629u2008-10-28
2007-07-101.00-2.8672011-04-01
2008-09-3037,517.98 10.719M2032-08-18
2010-08-180.92-7242901.911Y2018-10-13
2013-07-26133.49-0.000y2019-01-15
" + ], + "text/latex": [ + "\n", + "\\begin{table}\n", + "\\caption{timeseries}\n", + "\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=6.00em},\n", + "\tcolumn 2/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 3/.style={nodes={align=right }, nosep, text width=7.80em},\n", + "\tcolumn 4/.style={nodes={align=center}, nosep, text width=6.60em},\n", + "\tcolumn 5/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TYWTZOU2SXCNM) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\\\\n", + " privates\\grtspacer \\& Sacramento Edgewise Outlive float\\grtspacer \\& Sooner Celled Complements float\\grtspacer \\& Superheroes Prejudge Carnivore datetime\\grtspacer \\& \\\\\n", + " 2007-04-24 \\& 25.87 \\& -803.629u \\& 2008-10-28 \\& \\\\\n", + " 2007-07-10 \\& 1.00 \\& -2.867 \\& 2011-04-01 \\& \\\\\n", + " 2008-09-30 \\& 37,517.98 \\& 10.719M \\& 2032-08-18 \\& \\\\\n", + " 2010-08-18 \\& 0.92 \\& -7242901.911Y \\& 2018-10-13 \\& \\\\\n", + " 2013-07-26 \\& 133.49 \\& -0.000y \\& 2019-01-15 \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TYWTZOU2SXCNM-1-1.south west) -- (TYWTZOU2SXCNM-1-5.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TYWTZOU2SXCNM-2-1.south west) -- ([yshift=-0.0625em]TYWTZOU2SXCNM-2-5.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TYWTZOU2SXCNM-7-1.base west) -- ([yshift=-0.3125em]TYWTZOU2SXCNM-7-5.base east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em]TYWTZOU2SXCNM-1-2.south west) -- ([yshift=-0.3125em, xshift=-0.1875em]TYWTZOU2SXCNM-7-2.base west);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n" + ], + "text/plain": [ + "GreaterTable(df_id=TYWTZOU2SXCNM)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
multiindex
federallyrestrictionsdolphinAurora Merge Calculates floatBombing Honking Garage intFunnier Personals Shovels floatHealthier Chemically Construed floatWhereabouts Sept Cakes int
44,379disenfranchise80,923 32.454337,462,522 21.571M 238.509M-4,327
hybrid52,773 3.628M494,694,322 1.282GNaN6,496
58,702disenfranchise474 3.842M785,021,862 2.261k 11.004k-5,662
25,363 16.184M627,061,405 752.930k 398.233k6,743
41,796 3.821G562,015,666 9.799M 162.201m-2,439
" + ], + "text/latex": [ + "\n", + "\\begin{table}\n", + "\\caption{multiindex}\n", + "\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=3.60em},\n", + "\tcolumn 2/.style={nodes={align=left }, nosep, text width=8.40em},\n", + "\tcolumn 3/.style={nodes={align=left }, nosep, text width=3.60em},\n", + "\tcolumn 4/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 5/.style={nodes={align=right }, nosep, text width=6.60em},\n", + "\tcolumn 6/.style={nodes={align=right }, nosep, text width=5.40em},\n", + "\tcolumn 7/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 8/.style={nodes={align=right }, nosep, text width=6.60em},\n", + "\tcolumn 9/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TS57LTFJE7RXK) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\& \\& \\& \\& \\\\\n", + " federally\\grtspacer \\& restrictions\\grtspacer \\& dolphin\\grtspacer \\& Aurora Merge Calculates float\\grtspacer \\& Bombing Honking Garage int\\grtspacer \\& Funnier Personals Shovels float\\grtspacer \\& Healthier Chemically Construed float\\grtspacer \\& Whereabouts Sept Cakes int\\grtspacer \\& \\\\\n", + " 44,379 \\& disenfranchise \\& 80,923 \\& 32.454 \\& 337,462,522 \\& 21.571M \\& 238.509M \\& -4,327 \\& \\\\\n", + " \\& hybrid \\& 52,773 \\& 3.628M \\& 494,694,322 \\& 1.282G \\& NaN \\& 6,496 \\& \\\\\n", + " 58,702 \\& disenfranchise \\& 474 \\& 3.842M \\& 785,021,862 \\& 2.261k \\& 11.004k \\& -5,662 \\& \\\\\n", + " \\& disenfranchise \\& 25,363 \\& 16.184M \\& 627,061,405 \\& 752.930k \\& 398.233k \\& 6,743 \\& \\\\\n", + " \\& disenfranchise \\& 41,796 \\& 3.821G \\& 562,015,666 \\& 9.799M \\& 162.201m \\& -2,439 \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TS57LTFJE7RXK-1-1.south west) -- (TS57LTFJE7RXK-1-9.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TS57LTFJE7RXK-7-1.base west) -- ([yshift=-0.3125em]TS57LTFJE7RXK-7-9.base east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TS57LTFJE7RXK-2-1.south west) -- ([yshift=-0.0625em]TS57LTFJE7RXK-2-9.south east);\n", + "\\path[draw, very thin] ([yshift=-0.0625em]TS57LTFJE7RXK-4-1.south west) -- ([yshift=-0.0625em]TS57LTFJE7RXK-4-9.south east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em]TS57LTFJE7RXK-1-4.south west) -- ([yshift=-0.3125em, xshift=-0.1875em]TS57LTFJE7RXK-7-4.base west);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n" + ], + "text/plain": [ + "GreaterTable(df_id=TS57LTFJE7RXK)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
multicolumns
obligestrapped
hencestrategiesinstallationsstrategies
wednesdaysbossperceptioncomplexsorrylists
9542011-02-270.00000 7.066G3,923 13.712M
2,7692029-08-160.18763-6.666k-3,817 1.606G
5,6822029-08-160.00002-649.606a-6,446 34.617M
9,6610.01298 46281395957.136Y6,756 2.661
36,3382019-09-023.68136 11.656Y3,922 1.286
" + ], + "text/latex": [ + "\n", + "\\begin{table}\n", + "\\caption{multicolumns}\n", + "\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\trow 3/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\trow 4/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=6.00em},\n", + "\tcolumn 2/.style={nodes={align=center}, nosep, text width=6.00em},\n", + "\tcolumn 3/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 4/.style={nodes={align=right }, nosep, text width=10.20em},\n", + "\tcolumn 5/.style={nodes={align=right }, nosep, text width=7.80em},\n", + "\tcolumn 6/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 7/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TXM56Z4VR2ECH) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\& \\& \\\\\n", + " \\grtspacer \\& oblige\\grtspacer \\& \\grtspacer \\& \\grtspacer \\& strapped\\grtspacer \\& \\grtspacer \\& \\\\\n", + " \\grtspacer \\& hence\\grtspacer \\& \\grtspacer \\& strategies\\grtspacer \\& installations\\grtspacer \\& strategies\\grtspacer \\& \\\\\n", + " wednesdays\\grtspacer \\& boss\\grtspacer \\& perception\\grtspacer \\& complex\\grtspacer \\& sorry\\grtspacer \\& lists\\grtspacer \\& \\\\\n", + " 954 \\& 2011-02-27 \\& 0.00000 \\& 7.066G \\& 3,923 \\& 13.712M \\& \\\\\n", + " 2,769 \\& 2029-08-16 \\& 0.18763 \\& -6.666k \\& -3,817 \\& 1.606G \\& \\\\\n", + " 5,682 \\& 2029-08-16 \\& 0.00002 \\& -649.606a \\& -6,446 \\& 34.617M \\& \\\\\n", + " 9,661 \\& \\& 0.01298 \\& 46281395957.136Y \\& 6,756 \\& 2.661 \\& \\\\\n", + " 36,338 \\& 2019-09-02 \\& 3.68136 \\& 11.656Y \\& 3,922 \\& 1.286 \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TXM56Z4VR2ECH-1-1.south west) -- (TXM56Z4VR2ECH-1-7.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TXM56Z4VR2ECH-4-1.south west) -- ([yshift=-0.0625em]TXM56Z4VR2ECH-4-7.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TXM56Z4VR2ECH-9-1.base west) -- ([yshift=-0.3125em]TXM56Z4VR2ECH-9-7.base east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em, yshift=-0.0625em]TXM56Z4VR2ECH-2-2.south west) -- ([yshift=-0.0625em]TXM56Z4VR2ECH-2-7.south east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em, yshift=-0.0625em]TXM56Z4VR2ECH-3-2.south west) -- ([yshift=-0.0625em]TXM56Z4VR2ECH-3-7.south east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em]TXM56Z4VR2ECH-1-2.south west) -- ([yshift=-0.3125em, xshift=-0.1875em]TXM56Z4VR2ECH-9-2.base west);\n", + "\\path[draw, ultra thin] ([xshift=0.1875em, yshift=-0.0625em]TXM56Z4VR2ECH-1-4.south east) -- ([yshift=-0.3125em, xshift=0.1875em]TXM56Z4VR2ECH-9-4.base east);\n", + "\\path[draw, ultra thin] ([xshift=0.1875em, yshift=-0.0625em]TXM56Z4VR2ECH-2-3.south east) -- ([yshift=-0.3125em, xshift=0.1875em]TXM56Z4VR2ECH-9-3.base east);\n", + "\\path[draw, ultra thin] ([xshift=0.1875em, yshift=-0.0625em]TXM56Z4VR2ECH-2-5.south east) -- ([yshift=-0.3125em, xshift=0.1875em]TXM56Z4VR2ECH-9-5.base east);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n" + ], + "text/plain": [ + "GreaterTable(df_id=TXM56Z4VR2ECH)" + ] + }, + "metadata": {}, + "output_type": "display_data" + }, + { + "data": { + "text/html": [ + "
\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "\n", + "
complex
originalitysilent
swamitortwarnsswamitort
heartbreakinvesttriggeredlaserspastsystemsveteranchalkcollegialgraderstrivializeripostecomplementary
26,561modal8,3018,600.00-5,874.002020-01-30-0.000y 79.8032021-07-29 42.510nNaN1,992.00
robbing3,413-6,481.006,985.002012-10-262024-08-16 525.351 43.5302011-06-20 74.613u 399.425nan
15,208491.00-7,376.002029-11-152026-04-07 262.122p 386.621M2010-10-13 60.250u 10.456M2,007.00
34,445-7,082.003,805.002015-11-202031-07-29 14.838mNaN2017-09-11 11.059u 14.1471,997.00
37,0663,038.00-8,099.002025-08-132025-04-03 22438.774Y 140.911k2006-07-28 416.652n 22.5072,023.00
" + ], + "text/latex": [ + "\n", + "\\begin{table}\n", + "\\caption{complex}\n", + "\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\trow 3/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\trow 4/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=6.00em},\n", + "\tcolumn 2/.style={nodes={align=left }, nosep, text width=4.20em},\n", + "\tcolumn 3/.style={nodes={align=left }, nosep, text width=5.40em},\n", + "\tcolumn 4/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 5/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 6/.style={nodes={align=center}, nosep, text width=6.00em},\n", + "\tcolumn 7/.style={nodes={align=center}, nosep, text width=6.00em},\n", + "\tcolumn 8/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 9/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 10/.style={nodes={align=center}, nosep, text width=6.00em},\n", + "\tcolumn 11/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 12/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 13/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 14/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TBBWYY5OA6SMZ) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\& \\& \\& \\& \\& \\& \\& \\& \\& \\\\\n", + " \\grtspacer \\& \\grtspacer \\& \\grtspacer \\& originality\\grtspacer \\& \\grtspacer \\& \\grtspacer \\& \\grtspacer \\& \\grtspacer \\& \\grtspacer \\& \\grtspacer \\& \\grtspacer \\& silent\\grtspacer \\& \\grtspacer \\& \\\\\n", + " \\grtspacer \\& \\grtspacer \\& \\grtspacer \\& swami\\grtspacer \\& \\grtspacer \\& tort\\grtspacer \\& \\grtspacer \\& warns\\grtspacer \\& \\grtspacer \\& \\grtspacer \\& \\grtspacer \\& swami\\grtspacer \\& tort\\grtspacer \\& \\\\\n", + " heartbreak\\grtspacer \\& invest\\grtspacer \\& triggered\\grtspacer \\& lasers\\grtspacer \\& past\\grtspacer \\& systems\\grtspacer \\& veteran\\grtspacer \\& chalk\\grtspacer \\& collegial\\grtspacer \\& graders\\grtspacer \\& trivialize\\grtspacer \\& riposte\\grtspacer \\& complementary\\grtspacer \\& \\\\\n", + " 26,561 \\& modal \\& 8,301 \\& 8,600.00 \\& -5,874.00 \\& 2020-01-30 \\& \\& -0.000y \\& 79.803 \\& 2021-07-29 \\& 42.510n \\& NaN \\& 1,992.00 \\& \\\\\n", + " \\& robbing \\& 3,413 \\& -6,481.00 \\& 6,985.00 \\& 2012-10-26 \\& 2024-08-16 \\& 525.351 \\& 43.530 \\& 2011-06-20 \\& 74.613u \\& 399.425 \\& nan \\& \\\\\n", + " \\& robbing \\& 15,208 \\& 491.00 \\& -7,376.00 \\& 2029-11-15 \\& 2026-04-07 \\& 262.122p \\& 386.621M \\& 2010-10-13 \\& 60.250u \\& 10.456M \\& 2,007.00 \\& \\\\\n", + " \\& robbing \\& 34,445 \\& -7,082.00 \\& 3,805.00 \\& 2015-11-20 \\& 2031-07-29 \\& 14.838m \\& NaN \\& 2017-09-11 \\& 11.059u \\& 14.147 \\& 1,997.00 \\& \\\\\n", + " \\& robbing \\& 37,066 \\& 3,038.00 \\& -8,099.00 \\& 2025-08-13 \\& 2025-04-03 \\& 22438.774Y \\& 140.911k \\& 2006-07-28 \\& 416.652n \\& 22.507 \\& 2,023.00 \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TBBWYY5OA6SMZ-1-1.south west) -- (TBBWYY5OA6SMZ-1-14.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TBBWYY5OA6SMZ-4-1.south west) -- ([yshift=-0.0625em]TBBWYY5OA6SMZ-4-14.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TBBWYY5OA6SMZ-9-1.base west) -- ([yshift=-0.3125em]TBBWYY5OA6SMZ-9-14.base east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em, yshift=-0.0625em]TBBWYY5OA6SMZ-2-4.south west) -- ([yshift=-0.0625em]TBBWYY5OA6SMZ-2-14.south east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em, yshift=-0.0625em]TBBWYY5OA6SMZ-3-4.south west) -- ([yshift=-0.0625em]TBBWYY5OA6SMZ-3-14.south east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em]TBBWYY5OA6SMZ-1-4.south west) -- ([yshift=-0.3125em, xshift=-0.1875em]TBBWYY5OA6SMZ-9-4.base west);\n", + "\\path[draw, ultra thin] ([xshift=0.1875em, yshift=-0.0625em]TBBWYY5OA6SMZ-1-11.south east) -- ([yshift=-0.3125em, xshift=0.1875em]TBBWYY5OA6SMZ-9-11.base east);\n", + "\\path[draw, ultra thin] ([xshift=0.1875em, yshift=-0.0625em]TBBWYY5OA6SMZ-2-5.south east) -- ([yshift=-0.3125em, xshift=0.1875em]TBBWYY5OA6SMZ-9-5.base east);\n", + "\\path[draw, ultra thin] ([xshift=0.1875em, yshift=-0.0625em]TBBWYY5OA6SMZ-2-7.south east) -- ([yshift=-0.3125em, xshift=0.1875em]TBBWYY5OA6SMZ-9-7.base east);\n", + "\\path[draw, ultra thin] ([xshift=0.1875em, yshift=-0.0625em]TBBWYY5OA6SMZ-2-12.south east) -- ([yshift=-0.3125em, xshift=0.1875em]TBBWYY5OA6SMZ-9-12.base east);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n" + ], + "text/plain": [ + "GreaterTable(df_id=TBBWYY5OA6SMZ)" + ] + }, + "metadata": {}, + "output_type": "display_data" + } + ], + "source": [ + "for k, v in ts.items():\n", + " display(GT(v.head(), show_index=True, max_table_width=80, debug=False, caption=k))" + ] + }, + { + "cell_type": "markdown", + "id": "945f2bb9-9295-498a-a724-f367ce742533", + "metadata": {}, + "source": [ + "# LaTeX Mode" + ] + }, + { + "cell_type": "code", + "execution_count": 5, + "id": "51858d09-c98f-4675-a61c-c7a839f75686", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "\n", + "\\begin{table}\n", + "\\caption{basic}\n", + "\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=3.60em},\n", + "\tcolumn 2/.style={nodes={align=right }, nosep, text width=3.60em},\n", + "\tcolumn 3/.style={nodes={align=right }, nosep, text width=4.80em},\n", + "\tcolumn 4/.style={nodes={align=center}, nosep, text width=6.00em},\n", + "\tcolumn 5/.style={nodes={align=center}, nosep, text width=6.00em},\n", + "\tcolumn 6/.style={nodes={align=center}, nosep, text width=6.00em},\n", + "\tcolumn 7/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 8/.style={nodes={align=right }, nosep, text width=4.80em},\n", + "\tcolumn 9/.style={nodes={align=right }, nosep, text width=4.80em},\n", + "\tcolumn 10/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TAQLQQIAQAPUY) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\& \\& \\& \\& \\& \\\\\n", + " discontinuance\\grtspacer \\& boning float\\grtspacer \\& cylinder float\\grtspacer \\& grassy date\\grtspacer \\& lurching datetime\\grtspacer \\& monitoring date\\grtspacer \\& pleasantly int\\grtspacer \\& teaser year\\grtspacer \\& weighing year\\grtspacer \\& \\\\\n", + " 943 \\& 3.263 \\& 0.00000 \\& 2014-05-17 \\& 2022-03-21 \\& 2011-03-14 \\& -6,346.00 \\& 2,011.00 \\& 2,017 \\& \\\\\n", + " 10,424 \\& 5.337 \\& 0.00003 \\& 2017-06-15 \\& 2009-10-13 \\& 2028-01-01 \\& 7,637.00 \\& 1,993.00 \\& 2,016 \\& \\\\\n", + " 11,582 \\& 0.219 \\& 0.17478 \\& 2014-05-17 \\& 2018-11-02 \\& 2011-03-14 \\& -2,602.00 \\& 2,007.00 \\& 2,010 \\& \\\\\n", + " 30,946 \\& 0.000 \\& 0.00004 \\& 2018-04-02 \\& 2011-04-24 \\& 2009-02-03 \\& -4,318.00 \\& 1,995.00 \\& 2,026 \\& \\\\\n", + " 49,857 \\& 0.002 \\& 0.10229 \\& 2018-04-02 \\& 2018-11-02 \\& 2028-10-24 \\& 9,433.00 \\& 1,996.00 \\& 2,007 \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TAQLQQIAQAPUY-1-1.south west) -- (TAQLQQIAQAPUY-1-10.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TAQLQQIAQAPUY-2-1.south west) -- ([yshift=-0.0625em]TAQLQQIAQAPUY-2-10.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TAQLQQIAQAPUY-7-1.base west) -- ([yshift=-0.3125em]TAQLQQIAQAPUY-7-10.base east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em]TAQLQQIAQAPUY-1-2.south west) -- ([yshift=-0.3125em, xshift=-0.1875em]TAQLQQIAQAPUY-7-2.base west);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n", + "\n", + "\n", + "\\begin{table}\n", + "\\caption{timeseries}\n", + "\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=6.00em},\n", + "\tcolumn 2/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 3/.style={nodes={align=right }, nosep, text width=7.80em},\n", + "\tcolumn 4/.style={nodes={align=center}, nosep, text width=6.60em},\n", + "\tcolumn 5/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TLAKKRZA3NH2N) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\\\\n", + " privates\\grtspacer \\& Sacramento Edgewise Outlive float\\grtspacer \\& Sooner Celled Complements float\\grtspacer \\& Superheroes Prejudge Carnivore datetime\\grtspacer \\& \\\\\n", + " 2007-04-24 \\& 25.87 \\& -803.629u \\& 2008-10-28 \\& \\\\\n", + " 2007-07-10 \\& 1.00 \\& -2.867 \\& 2011-04-01 \\& \\\\\n", + " 2008-09-30 \\& 37,517.98 \\& 10.719M \\& 2032-08-18 \\& \\\\\n", + " 2010-08-18 \\& 0.92 \\& -7242901.911Y \\& 2018-10-13 \\& \\\\\n", + " 2013-07-26 \\& 133.49 \\& -0.000y \\& 2019-01-15 \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TLAKKRZA3NH2N-1-1.south west) -- (TLAKKRZA3NH2N-1-5.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TLAKKRZA3NH2N-2-1.south west) -- ([yshift=-0.0625em]TLAKKRZA3NH2N-2-5.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TLAKKRZA3NH2N-7-1.base west) -- ([yshift=-0.3125em]TLAKKRZA3NH2N-7-5.base east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em]TLAKKRZA3NH2N-1-2.south west) -- ([yshift=-0.3125em, xshift=-0.1875em]TLAKKRZA3NH2N-7-2.base west);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n", + "\n", + "\n", + "\\begin{table}\n", + "\\caption{multiindex}\n", + "\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=3.60em},\n", + "\tcolumn 2/.style={nodes={align=left }, nosep, text width=8.40em},\n", + "\tcolumn 3/.style={nodes={align=left }, nosep, text width=3.60em},\n", + "\tcolumn 4/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 5/.style={nodes={align=right }, nosep, text width=6.60em},\n", + "\tcolumn 6/.style={nodes={align=right }, nosep, text width=5.40em},\n", + "\tcolumn 7/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 8/.style={nodes={align=right }, nosep, text width=6.60em},\n", + "\tcolumn 9/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TGYG4EU4RPTVC) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\& \\& \\& \\& \\\\\n", + " federally\\grtspacer \\& restrictions\\grtspacer \\& dolphin\\grtspacer \\& Aurora Merge Calculates float\\grtspacer \\& Bombing Honking Garage int\\grtspacer \\& Funnier Personals Shovels float\\grtspacer \\& Healthier Chemically Construed float\\grtspacer \\& Whereabouts Sept Cakes int\\grtspacer \\& \\\\\n", + " 44,379 \\& disenfranchise \\& 80,923 \\& 32.454 \\& 337,462,522 \\& 21.571M \\& 238.509M \\& -4,327 \\& \\\\\n", + " \\& hybrid \\& 52,773 \\& 3.628M \\& 494,694,322 \\& 1.282G \\& NaN \\& 6,496 \\& \\\\\n", + " 58,702 \\& disenfranchise \\& 474 \\& 3.842M \\& 785,021,862 \\& 2.261k \\& 11.004k \\& -5,662 \\& \\\\\n", + " \\& disenfranchise \\& 25,363 \\& 16.184M \\& 627,061,405 \\& 752.930k \\& 398.233k \\& 6,743 \\& \\\\\n", + " \\& disenfranchise \\& 41,796 \\& 3.821G \\& 562,015,666 \\& 9.799M \\& 162.201m \\& -2,439 \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TGYG4EU4RPTVC-1-1.south west) -- (TGYG4EU4RPTVC-1-9.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TGYG4EU4RPTVC-7-1.base west) -- ([yshift=-0.3125em]TGYG4EU4RPTVC-7-9.base east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TGYG4EU4RPTVC-2-1.south west) -- ([yshift=-0.0625em]TGYG4EU4RPTVC-2-9.south east);\n", + "\\path[draw, very thin] ([yshift=-0.0625em]TGYG4EU4RPTVC-4-1.south west) -- ([yshift=-0.0625em]TGYG4EU4RPTVC-4-9.south east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em]TGYG4EU4RPTVC-1-4.south west) -- ([yshift=-0.3125em, xshift=-0.1875em]TGYG4EU4RPTVC-7-4.base west);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n", + "\n", + "\n", + "\\begin{table}\n", + "\\caption{multicolumns}\n", + "\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\trow 3/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\trow 4/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=6.00em},\n", + "\tcolumn 2/.style={nodes={align=center}, nosep, text width=6.00em},\n", + "\tcolumn 3/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 4/.style={nodes={align=right }, nosep, text width=10.20em},\n", + "\tcolumn 5/.style={nodes={align=right }, nosep, text width=7.80em},\n", + "\tcolumn 6/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 7/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TVGLOCWS34RTD) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\& \\& \\\\\n", + " \\grtspacer \\& oblige\\grtspacer \\& \\grtspacer \\& \\grtspacer \\& strapped\\grtspacer \\& \\grtspacer \\& \\\\\n", + " \\grtspacer \\& hence\\grtspacer \\& \\grtspacer \\& strategies\\grtspacer \\& installations\\grtspacer \\& strategies\\grtspacer \\& \\\\\n", + " wednesdays\\grtspacer \\& boss\\grtspacer \\& perception\\grtspacer \\& complex\\grtspacer \\& sorry\\grtspacer \\& lists\\grtspacer \\& \\\\\n", + " 954 \\& 2011-02-27 \\& 0.00000 \\& 7.066G \\& 3,923 \\& 13.712M \\& \\\\\n", + " 2,769 \\& 2029-08-16 \\& 0.18763 \\& -6.666k \\& -3,817 \\& 1.606G \\& \\\\\n", + " 5,682 \\& 2029-08-16 \\& 0.00002 \\& -649.606a \\& -6,446 \\& 34.617M \\& \\\\\n", + " 9,661 \\& \\& 0.01298 \\& 46281395957.136Y \\& 6,756 \\& 2.661 \\& \\\\\n", + " 36,338 \\& 2019-09-02 \\& 3.68136 \\& 11.656Y \\& 3,922 \\& 1.286 \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TVGLOCWS34RTD-1-1.south west) -- (TVGLOCWS34RTD-1-7.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TVGLOCWS34RTD-4-1.south west) -- ([yshift=-0.0625em]TVGLOCWS34RTD-4-7.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TVGLOCWS34RTD-9-1.base west) -- ([yshift=-0.3125em]TVGLOCWS34RTD-9-7.base east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em, yshift=-0.0625em]TVGLOCWS34RTD-2-2.south west) -- ([yshift=-0.0625em]TVGLOCWS34RTD-2-7.south east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em, yshift=-0.0625em]TVGLOCWS34RTD-3-2.south west) -- ([yshift=-0.0625em]TVGLOCWS34RTD-3-7.south east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em]TVGLOCWS34RTD-1-2.south west) -- ([yshift=-0.3125em, xshift=-0.1875em]TVGLOCWS34RTD-9-2.base west);\n", + "\\path[draw, ultra thin] ([xshift=0.1875em, yshift=-0.0625em]TVGLOCWS34RTD-1-4.south east) -- ([yshift=-0.3125em, xshift=0.1875em]TVGLOCWS34RTD-9-4.base east);\n", + "\\path[draw, ultra thin] ([xshift=0.1875em, yshift=-0.0625em]TVGLOCWS34RTD-2-3.south east) -- ([yshift=-0.3125em, xshift=0.1875em]TVGLOCWS34RTD-9-3.base east);\n", + "\\path[draw, ultra thin] ([xshift=0.1875em, yshift=-0.0625em]TVGLOCWS34RTD-2-5.south east) -- ([yshift=-0.3125em, xshift=0.1875em]TVGLOCWS34RTD-9-5.base east);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n", + "\n", + "\n", + "\\begin{table}\n", + "\\caption{complex}\n", + "\n", + "\\centering{\n", + "\\begin{tikzpicture}[\n", + " auto,\n", + " transform shape,\n", + " nosep/.style={inner sep=0},\n", + " table/.style={\n", + " matrix of nodes,\n", + " row sep=0.125em,\n", + " column sep=0.375em,\n", + " nodes in empty cells,\n", + " nodes={rectangle, scale=1.0, text badly ragged },\n", + "\trow 1/.style={nodes={text=black, anchor=north, inner ysep=0, text height=0, text depth=0}},\n", + "\trow 2/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\trow 3/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\trow 4/.style={nodes={text=black, anchor=south, inner ysep=.2em, minimum height=1.3em, font=\\bfseries}},\n", + "\tcolumn 1/.style={nodes={align=left }, text height=0.9em, text depth=0.2em, inner xsep=0.375em, inner ysep=0, text width=6.00em},\n", + "\tcolumn 2/.style={nodes={align=left }, nosep, text width=4.20em},\n", + "\tcolumn 3/.style={nodes={align=left }, nosep, text width=5.40em},\n", + "\tcolumn 4/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 5/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 6/.style={nodes={align=center}, nosep, text width=6.00em},\n", + "\tcolumn 7/.style={nodes={align=center}, nosep, text width=6.00em},\n", + "\tcolumn 8/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 9/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 10/.style={nodes={align=center}, nosep, text width=6.00em},\n", + "\tcolumn 11/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 12/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 13/.style={nodes={align=right }, nosep, text width=6.00em},\n", + "\tcolumn 14/.style={text height=0.9em, text depth=0.2em, nosep, text width=0em}\t}]\n", + "\\matrix (TVDUZM2RAS34T) [table, ampersand replacement=\\&]{\n", + " \\& \\& \\& \\& \\& \\& \\& \\& \\& \\& \\& \\& \\& \\\\\n", + " \\grtspacer \\& \\grtspacer \\& \\grtspacer \\& originality\\grtspacer \\& \\grtspacer \\& \\grtspacer \\& \\grtspacer \\& \\grtspacer \\& \\grtspacer \\& \\grtspacer \\& \\grtspacer \\& silent\\grtspacer \\& \\grtspacer \\& \\\\\n", + " \\grtspacer \\& \\grtspacer \\& \\grtspacer \\& swami\\grtspacer \\& \\grtspacer \\& tort\\grtspacer \\& \\grtspacer \\& warns\\grtspacer \\& \\grtspacer \\& \\grtspacer \\& \\grtspacer \\& swami\\grtspacer \\& tort\\grtspacer \\& \\\\\n", + " heartbreak\\grtspacer \\& invest\\grtspacer \\& triggered\\grtspacer \\& lasers\\grtspacer \\& past\\grtspacer \\& systems\\grtspacer \\& veteran\\grtspacer \\& chalk\\grtspacer \\& collegial\\grtspacer \\& graders\\grtspacer \\& trivialize\\grtspacer \\& riposte\\grtspacer \\& complementary\\grtspacer \\& \\\\\n", + " 26,561 \\& modal \\& 8,301 \\& 8,600.00 \\& -5,874.00 \\& 2020-01-30 \\& \\& -0.000y \\& 79.803 \\& 2021-07-29 \\& 42.510n \\& NaN \\& 1,992.00 \\& \\\\\n", + " \\& robbing \\& 3,413 \\& -6,481.00 \\& 6,985.00 \\& 2012-10-26 \\& 2024-08-16 \\& 525.351 \\& 43.530 \\& 2011-06-20 \\& 74.613u \\& 399.425 \\& nan \\& \\\\\n", + " \\& robbing \\& 15,208 \\& 491.00 \\& -7,376.00 \\& 2029-11-15 \\& 2026-04-07 \\& 262.122p \\& 386.621M \\& 2010-10-13 \\& 60.250u \\& 10.456M \\& 2,007.00 \\& \\\\\n", + " \\& robbing \\& 34,445 \\& -7,082.00 \\& 3,805.00 \\& 2015-11-20 \\& 2031-07-29 \\& 14.838m \\& NaN \\& 2017-09-11 \\& 11.059u \\& 14.147 \\& 1,997.00 \\& \\\\\n", + " \\& robbing \\& 37,066 \\& 3,038.00 \\& -8,099.00 \\& 2025-08-13 \\& 2025-04-03 \\& 22438.774Y \\& 140.911k \\& 2006-07-28 \\& 416.652n \\& 22.507 \\& 2,023.00 \\& \\\\\n", + "};\n", + "\n", + "\\path[draw, thick] (TVDUZM2RAS34T-1-1.south west) -- (TVDUZM2RAS34T-1-14.south east);\n", + "\\path[draw, semithick] ([yshift=-0.0625em]TVDUZM2RAS34T-4-1.south west) -- ([yshift=-0.0625em]TVDUZM2RAS34T-4-14.south east);\n", + "\\path[draw, thick] ([yshift=-0.3125em]TVDUZM2RAS34T-9-1.base west) -- ([yshift=-0.3125em]TVDUZM2RAS34T-9-14.base east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em, yshift=-0.0625em]TVDUZM2RAS34T-2-4.south west) -- ([yshift=-0.0625em]TVDUZM2RAS34T-2-14.south east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em, yshift=-0.0625em]TVDUZM2RAS34T-3-4.south west) -- ([yshift=-0.0625em]TVDUZM2RAS34T-3-14.south east);\n", + "\\path[draw, very thin] ([xshift=-0.1875em]TVDUZM2RAS34T-1-4.south west) -- ([yshift=-0.3125em, xshift=-0.1875em]TVDUZM2RAS34T-9-4.base west);\n", + "\\path[draw, ultra thin] ([xshift=0.1875em, yshift=-0.0625em]TVDUZM2RAS34T-1-11.south east) -- ([yshift=-0.3125em, xshift=0.1875em]TVDUZM2RAS34T-9-11.base east);\n", + "\\path[draw, ultra thin] ([xshift=0.1875em, yshift=-0.0625em]TVDUZM2RAS34T-2-5.south east) -- ([yshift=-0.3125em, xshift=0.1875em]TVDUZM2RAS34T-9-5.base east);\n", + "\\path[draw, ultra thin] ([xshift=0.1875em, yshift=-0.0625em]TVDUZM2RAS34T-2-7.south east) -- ([yshift=-0.3125em, xshift=0.1875em]TVDUZM2RAS34T-9-7.base east);\n", + "\\path[draw, ultra thin] ([xshift=0.1875em, yshift=-0.0625em]TVDUZM2RAS34T-2-12.south east) -- ([yshift=-0.3125em, xshift=0.1875em]TVDUZM2RAS34T-9-12.base east);\n", + "\n", + "\n", + "\n", + "\\end{tikzpicture}\n", + "} % close centering\n", + "\\end{table}\n", + "\n" + ] + } + ], + "source": [ + "for k, v in ts.items():\n", + " print(GT(v.head(), show_index=True, max_table_width=80, debug=False, caption=k).make_tikz())" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "fa56eb4d-7b08-4225-9a64-c465905e87b9", + "metadata": {}, + "outputs": [], + "source": [] + }, + { + "cell_type": "markdown", + "id": "125b0cff-f248-4864-90e6-d8bdf84b603c", + "metadata": {}, + "source": [ + "# Text Mode" + ] + }, + { + "cell_type": "code", + "execution_count": 3, + "id": "5a9dda81-8334-4f9f-ab2c-358228c4d936", + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "cw_target = 80 and input_target = 48\n", + "Weird, cols not all the same size 0 83\n", + "Actual text table width by row 0\n", + "top row │ ┃ │ │ │ lurch │ │ │ │ │\n", + "actual widths by column [ 9 8 10 8 8 8 12 11 8]\n", + "actual total width 83\n", + "formatted output\n", + "┍━━━━━━━━┳━━━━━━━┯━━━━━━━━━┯━━━━━━━┯━━━━━━━┯━━━━━━━┯━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━┑\n", + "│ ┃ │ │ │ lurch │ │ │ │ │\n", + "│ discon ┃ bonin │ │ grass │ ing d │ monit │ │ │ weigh │\n", + "│ tinuan ┃ g │ cylinde │ y │ ateti │ oring │ pleasantl │ teaser │ ing │\n", + "│ ce ┃ float │ r float │ date │ me │ date │ y int │ year │ year │\n", + "┝━━━━━━━━╋━━━━━━━┿━━━━━━━━━┿━━━━━━━┿━━━━━━━┿━━━━━━━┿━━━━━━━━━━━┿━━━━━━━━━━┿━━━━━━━┥\n", + "│ 943 ┃ 3.263 │ 0.00000 │ 2014- │ 2022- │ 2011- │ -6,346.00 │ 2,011.00 │ 2,017 │\n", + "│ ┃ │ │ 05-17 │ 03-21 │ 03-14 │ │ │ │\n", + "├────────╂───────┼─────────┼───────┼───────┼───────┼───────────┼──────────┼───────┤\n", + "│ 10,424 ┃ 5.337 │ 0.00003 │ 2017- │ 2009- │ 2028- │ 7,637.00 │ 1,993.00 │ 2,016 │\n", + "│ ┃ │ │ 06-15 │ 10-13 │ 01-01 │ │ │ │\n", + "├────────╂───────┼─────────┼───────┼───────┼───────┼───────────┼──────────┼───────┤\n", + "│ 11,582 ┃ 0.219 │ 0.17478 │ 2014- │ 2018- │ 2011- │ -2,602.00 │ 2,007.00 │ 2,010 │\n", + "│ ┃ │ │ 05-17 │ 11-02 │ 03-14 │ │ │ │\n", + "├────────╂───────┼─────────┼───────┼───────┼───────┼───────────┼──────────┼───────┤\n", + "│ 30,946 ┃ 0.000 │ 0.00004 │ 2018- │ 2011- │ 2009- │ -4,318.00 │ 1,995.00 │ 2,026 │\n", + "│ ┃ │ │ 04-02 │ 04-24 │ 02-03 │ │ │ │\n", + "├────────╂───────┼─────────┼───────┼───────┼───────┼───────────┼──────────┼───────┤\n", + "│ 49,857 ┃ 0.002 │ 0.10229 │ 2018- │ 2018- │ 2028- │ 9,433.00 │ 1,996.00 │ 2,007 │\n", + "│ ┃ │ │ 04-02 │ 11-02 │ 10-24 │ │ │ │\n", + "┕━━━━━━━━┻━━━━━━━┷━━━━━━━━━┷━━━━━━━┷━━━━━━━┷━━━━━━━┷━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━┙\n", + "\n", + "=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n", + "cw_target = 80 and input_target = 68\n", + "Weird, cols not all the same size 0 57\n", + "Actual text table width by row 0\n", + "top row │ ┃ Sacramento │ │ Superheroes │\n", + "actual widths by column [13 13 16 14]\n", + "actual total width 57\n", + "formatted output\n", + "┍━━━━━━━━━━━━┳━━━━━━━━━━━━┯━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━┑\n", + "│ ┃ Sacramento │ │ Superheroes │\n", + "│ ┃ Edgewise │ Sooner Celled │ Prejudge │\n", + "│ ┃ Outlive │ Complements │ Carnivore │\n", + "│ privates ┃ float │ float │ datetime │\n", + "┝━━━━━━━━━━━━╋━━━━━━━━━━━━┿━━━━━━━━━━━━━━━┿━━━━━━━━━━━━━┥\n", + "│ 2007-04-24 ┃ 25.87 │ -803.629u │ 2008-10-28 │\n", + "├────────────╂────────────┼───────────────┼─────────────┤\n", + "│ 2007-07-10 ┃ 1.00 │ -2.867 │ 2011-04-01 │\n", + "├────────────╂────────────┼───────────────┼─────────────┤\n", + "│ 2008-09-30 ┃ 37,517.98 │ 10.719M │ 2032-08-18 │\n", + "├────────────╂────────────┼───────────────┼─────────────┤\n", + "│ 2010-08-18 ┃ 0.92 │ -7242901.911Y │ 2018-10-13 │\n", + "├────────────╂────────────┼───────────────┼─────────────┤\n", + "│ 2013-07-26 ┃ 133.49 │ -0.000y │ 2019-01-15 │\n", + "┕━━━━━━━━━━━━┻━━━━━━━━━━━━┷━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━┙\n", + "\n", + "=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n", + "cw_target = 80 and input_target = 60\n", + "Weird, cols not all the same size 0 91\n", + "Actual text table width by row 0\n", + "top row │ │ │ ┃ Aurora │ │ Funnier │ Healthie │ Wherea │\n", + "actual widths by column [ 9 17 9 10 14 11 11 9]\n", + "actual total width 91\n", + "formatted output\n", + "┍━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━┳━━━━━━━━━┯━━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━━┑\n", + "│ │ │ ┃ Aurora │ │ Funnier │ Healthie │ Wherea │\n", + "│ │ │ ┃ Merge C │ │ Personal │ r Chemic │ bouts │\n", + "│ │ │ ┃ alculat │ Bombing │ s │ ally Con │ Sept │\n", + "│ federa │ │ dolphi ┃ es │ Honking │ Shovels │ strued │ Cakes │\n", + "│ lly │ restrictions │ n ┃ float │ Garage int │ float │ float │ int │\n", + "┝━━━━━━━━┿━━━━━━━━━━━━━━━━┿━━━━━━━━╋━━━━━━━━━┿━━━━━━━━━━━━━┿━━━━━━━━━━┿━━━━━━━━━━┿━━━━━━━━┥\n", + "│ 44,379 │ disenfranchise │ 80,923 ┃ 32.454 │ 337,462,522 │ 21.571M │ 238.509M │ -4,327 │\n", + "├────────┼────────────────┼────────╂─────────┼─────────────┼──────────┼──────────┼────────┤\n", + "│ │ hybrid │ 52,773 ┃ 3.628M │ 494,694,322 │ 1.282G │ NaN │ 6,496 │\n", + "├────────┼────────────────┼────────╂─────────┼─────────────┼──────────┼──────────┼────────┤\n", + "│ 58,702 │ disenfranchise │ 474 ┃ 3.842M │ 785,021,862 │ 2.261k │ 11.004k │ -5,662 │\n", + "├────────┼────────────────┼────────╂─────────┼─────────────┼──────────┼──────────┼────────┤\n", + "│ │ │ 25,363 ┃ 16.184M │ 627,061,405 │ 752.930k │ 398.233k │ 6,743 │\n", + "├────────┼────────────────┼────────╂─────────┼─────────────┼──────────┼──────────┼────────┤\n", + "│ │ │ 41,796 ┃ 3.821G │ 562,015,666 │ 9.799M │ 162.201m │ -2,439 │\n", + "┕━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━┻━━━━━━━━━┷━━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━┙\n", + "\n", + "=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n", + "cw_target = 80 and input_target = 60\n", + "Weird, cols not all the same size 0 66\n", + "Actual text table width by row 0\n", + "top row │ ┃ oblig │ │ │ strapp │ strappe │\n", + "actual widths by column [ 9 8 10 19 9 10]\n", + "actual total width 66\n", + "formatted output\n", + "┍━━━━━━━━┳━━━━━━━┯━━━━━━━━━┯━━━━━━━━━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━┑\n", + "│ ┃ oblig │ │ │ strapp │ strappe │\n", + "│ ┃ e │ oblige │ oblige │ ed │ d │\n", + "├────────╂───────┼─────────┼──────────────────┼────────┼─────────┤\n", + "│ ┃ │ │ │ instal │ │\n", + "│ ┃ │ │ │ lation │ strateg │\n", + "│ ┃ hence │ hence │ strategies │ s │ ies │\n", + "├────────╂───────┼─────────┼──────────────────┼────────┼─────────┤\n", + "│ wednes ┃ │ percept │ │ │ │\n", + "│ days ┃ boss │ ion │ complex │ sorry │ lists │\n", + "┝━━━━━━━━╋━━━━━━━┿━━━━━━━━━┿━━━━━━━━━━━━━━━━━━┿━━━━━━━━┿━━━━━━━━━┥\n", + "│ 954 ┃ 2011- │ 0.00000 │ 7.066G │ 3,923 │ 13.712M │\n", + "│ ┃ 02-27 │ │ │ │ │\n", + "├────────╂───────┼─────────┼──────────────────┼────────┼─────────┤\n", + "│ 2,769 ┃ 2029- │ 0.18763 │ -6.666k │ -3,817 │ 1.606G │\n", + "│ ┃ 08-16 │ │ │ │ │\n", + "├────────╂───────┼─────────┼──────────────────┼────────┼─────────┤\n", + "│ 5,682 ┃ 2029- │ 0.00002 │ -649.606a │ -6,446 │ 34.617M │\n", + "│ ┃ 08-16 │ │ │ │ │\n", + "├────────╂───────┼─────────┼──────────────────┼────────┼─────────┤\n", + "│ 9,661 ┃ │ 0.01298 │ 46281395957.136Y │ 6,756 │ 2.661 │\n", + "├────────╂───────┼─────────┼──────────────────┼────────┼─────────┤\n", + "│ 36,338 ┃ 2019- │ 3.68136 │ 11.656Y │ 3,922 │ 1.286 │\n", + "│ ┃ 09-02 │ │ │ │ │\n", + "┕━━━━━━━━┻━━━━━━━┷━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━┙\n", + "\n", + "=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n", + "cw_target = 80 and input_target = 40\n", + "Weird, cols not all the same size 0 133\n", + "Actual text table width by row 0\n", + "top row │ │ │ ┃ │ │ origi │ origi │ │ │ origi │ │ │ │\n", + "actual widths by column [ 9 10 9 12 12 8 8 13 11 8 11 10 11]\n", + "actual total width 133\n", + "formatted output\n", + "┍━━━━━━━━┯━━━━━━━━━┯━━━━━━━━┳━━━━━━━━━━━┯━━━━━━━━━━━┯━━━━━━━┯━━━━━━━┯━━━━━━━━━━━━┯━━━━━━━━━━┯━━━━━━━┯━━━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━━┑\n", + "│ │ │ ┃ │ │ origi │ origi │ │ │ origi │ │ │ │\n", + "│ │ │ ┃ originali │ originali │ nalit │ nalit │ originalit │ original │ nalit │ original │ │ │\n", + "│ │ │ ┃ ty │ ty │ y │ y │ y │ ity │ y │ ity │ silent │ silent │\n", + "├────────┼─────────┼────────╂───────────┼───────────┼───────┼───────┼────────────┼──────────┼───────┼──────────┼─────────┼──────────┤\n", + "│ │ │ ┃ swami │ swami │ tort │ tort │ warns │ warns │ warns │ warns │ swami │ tort │\n", + "├────────┼─────────┼────────╂───────────┼───────────┼───────┼───────┼────────────┼──────────┼───────┼──────────┼─────────┼──────────┤\n", + "│ heartb │ │ trigge ┃ │ │ syste │ veter │ │ collegia │ grade │ triviali │ │ compleme │\n", + "│ reak │ invest │ red ┃ lasers │ past │ ms │ an │ chalk │ l │ rs │ ze │ riposte │ ntary │\n", + "┝━━━━━━━━┿━━━━━━━━━┿━━━━━━━━╋━━━━━━━━━━━┿━━━━━━━━━━━┿━━━━━━━┿━━━━━━━┿━━━━━━━━━━━━┿━━━━━━━━━━┿━━━━━━━┿━━━━━━━━━━┿━━━━━━━━━┿━━━━━━━━━━┥\n", + "│ 26,561 │ modal │ 8,301 ┃ 8,600.00 │ -5,874.00 │ 2020- │ │ -0.000y │ 79.803 │ 2021- │ 42.510n │ NaN │ 1,992.00 │\n", + "│ │ │ ┃ │ │ 01-30 │ │ │ │ 07-29 │ │ │ │\n", + "├────────┼─────────┼────────╂───────────┼───────────┼───────┼───────┼────────────┼──────────┼───────┼──────────┼─────────┼──────────┤\n", + "│ │ robbing │ 3,413 ┃ -6,481.00 │ 6,985.00 │ 2012- │ 2024- │ 525.351 │ 43.530 │ 2011- │ 74.613u │ 399.425 │ nan │\n", + "│ │ │ ┃ │ │ 10-26 │ 08-16 │ │ │ 06-20 │ │ │ │\n", + "├────────┼─────────┼────────╂───────────┼───────────┼───────┼───────┼────────────┼──────────┼───────┼──────────┼─────────┼──────────┤\n", + "│ │ │ 15,208 ┃ 491.00 │ -7,376.00 │ 2029- │ 2026- │ 262.122p │ 386.621M │ 2010- │ 60.250u │ 10.456M │ 2,007.00 │\n", + "│ │ │ ┃ │ │ 11-15 │ 04-07 │ │ │ 10-13 │ │ │ │\n", + "├────────┼─────────┼────────╂───────────┼───────────┼───────┼───────┼────────────┼──────────┼───────┼──────────┼─────────┼──────────┤\n", + "│ │ │ 34,445 ┃ -7,082.00 │ 3,805.00 │ 2015- │ 2031- │ 14.838m │ NaN │ 2017- │ 11.059u │ 14.147 │ 1,997.00 │\n", + "│ │ │ ┃ │ │ 11-20 │ 07-29 │ │ │ 09-11 │ │ │ │\n", + "├────────┼─────────┼────────╂───────────┼───────────┼───────┼───────┼────────────┼──────────┼───────┼──────────┼─────────┼──────────┤\n", + "│ │ │ 37,066 ┃ 3,038.00 │ -8,099.00 │ 2025- │ 2025- │ 22438.774Y │ 140.911k │ 2006- │ 416.652n │ 22.507 │ 2,023.00 │\n", + "│ │ │ ┃ │ │ 08-13 │ 04-03 │ │ │ 07-28 │ │ │ │\n", + "┕━━━━━━━━┷━━━━━━━━━┷━━━━━━━━┻━━━━━━━━━━━┷━━━━━━━━━━━┷━━━━━━━┷━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━━┙\n", + "\n", + "=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*\n" + ] + } + ], + "source": [ + "for k, v in ts.items():\n", + " # if k != 'multiindex': continue\n", + " cw_target = 80\n", + " input_target = cw_target - 4 * v.shape[1]\n", + " print(f'{cw_target = } and {input_target = }')\n", + " f = (GT(v.head(), show_index=True, max_table_width=80 - 4 * v.shape[1], debug=True))\n", + " sc.analysis(f)\n", + " # break\n", + " print('=*'*80)" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "dc2dc152-16fc-4782-896f-3b92ceddc5bb", + "metadata": {}, + "outputs": [], + "source": [] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3 (ipykernel)", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.13.3" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} diff --git a/pyproject.toml b/pyproject.toml index ace2d93..a3eb69e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,5 +1,5 @@ [build-system] -requires = ["setuptools>=62.3"] +requires = ["setuptools>=69"] build-backend = "setuptools.build_meta" [project] @@ -18,6 +18,7 @@ dependencies = [ "click", "pandas", "rich", + "pybtex", "IPython", ] classifiers = [