Skip to content

FormatOptions

🛈 DocStrings

How cell values are turned into display text.

Source code in src/cutepandas/frames/formatters.py
@dataclass(frozen=True, slots=True)
class FormatOptions:
    """How cell values are turned into display text."""

    float_precision: int = 6
    """Significant digits for floats (`{:.6g}`, whole numbers keep a `.0`)."""
    thousands_separator: bool = False
    """Group digits of integers and floats (`1,234,567`)."""
    null_text: str = ""
    """Text shown for missing values."""
    max_text_length: int = 200
    """Longer texts are cut and end with an ellipsis (the tooltip shows all)."""

float_precision class-attribute instance-attribute

float_precision: int = 6

Significant digits for floats ({:.6g}, whole numbers keep a .0).

max_text_length class-attribute instance-attribute

max_text_length: int = 200

Longer texts are cut and end with an ellipsis (the tooltip shows all).

null_text class-attribute instance-attribute

null_text: str = ''

Text shown for missing values.

thousands_separator class-attribute instance-attribute

thousands_separator: bool = False

Group digits of integers and floats (1,234,567).

:fa-brands-github: Show source on GitHub