str2d.Str2D.__init__
- Str2D.__init__(data: Any | None = None, min_width: int | None = None, min_height: int | None = None, halign: str | None = 'left', valign: str | None = 'top', fill: str | Tuple[str, int] | None = None, **kwargs) None [source]
Create a new Str2D object. The input data can be a string, a structured array, a boolean array, a DataFrame, a Series, or an iterable. If the input data is a structured array, the keyword arguments will be ignored.
- Parameters:
data (Optional[Any], optional) – The input data, by default None.
min_width (Optional[int], optional) – The minimum width of the output, by default None.
min_height (Optional[int], optional) – The minimum height of the output, by default None.
halign (Optional[str], optional) – The horizontal alignment, by default ‘left’.
valign (Optional[str], optional) – The vertical alignment, by default ‘top’.
fill (Optional[Union[str, Tuple[str, int]]], optional) – The fill value, by default None.
**kwargs (dict) – Additional keyword arguments to pass to the parse method.
- Raises:
ValueError – If the fill, horizontal alignment, or vertical alignment value is invalid.