Skip to content

Notebook display API

These functions configure HTML previews for pyarrow.Table values in notebook environments. For task-oriented setup, see Configure notebook display.

Configure and enable bounded HTML previews for Arrow tables.

Parameters:

Name Type Description Default
max_rows int

Maximum number of rows shown in a preview.

20
max_cols int

Maximum number of columns shown in a preview.

50
max_cell_chars int

Maximum number of characters shown for each cell.

2000
align str

Cell alignment: "right", "left", or "auto". Automatic alignment left-aligns text and right-aligns numeric values.

'right'

Returns:

Type Description
bool

True when the formatter is active after the call; False when no compatible IPython HTML formatter is available.

Disable bounded HTML previews for Arrow tables.

Returns:

Type Description
bool

True when the custom formatter was removed; False when it was not active or no compatible IPython HTML formatter was available.

Notes

If another formatter was active before this package installed its own, that formatter is restored.

Load notebook display settings from a TOML file.

Parameters:

Name Type Description Default
path str

Path to the TOML configuration file.

required

Returns:

Type Description
bool

True when a non-empty notebook display section was found and processed; False when the file could not be read or did not contain settings.

Notes

The file may use [notebook_display] or [timeseries_table_format.notebook_display]. Loading settings does not enable the formatter outside IPython or Jupyter.