typeddfs._mixins._formatted_mixin

Mixin for formats like HTML and RST.

Module Contents

class typeddfs._mixins._formatted_mixin._FormattedMixin
_tabulate(self, fmt: Union[str, tabulate.TableFormat], **kwargs) str
classmethod read_html(cls, path: typeddfs.utils._utils.PathLike, *args, **kwargs) __qualname__

Similar to pd.read_html, but requires exactly 1 table and returns it.

Raises
  • lxml.etree.XMLSyntaxError – If the HTML could not be parsed

  • NoValueError – If no tables are found

  • ValueNotUniqueError – If multiple tables are found

to_html(self, *args, **kwargs) Optional[str]
to_markdown(self, *args, **kwargs) Optional[str]
to_rst(self, path_or_none: Optional[typeddfs.utils._utils.PathLike] = None, style: str = 'simple', mode: str = 'w') Optional[str]

Writes a reStructuredText table. :param path_or_none: Either a file path or None to return the string :param style: The type of table; currently only β€œsimple” is supported :param mode: Write mode