typeddfs._mixins._full_io_mixin

Combines various IO mixins.

Module Contents

class typeddfs._mixins._full_io_mixin._FullIoMixin
classmethod _call_read(cls, clazz, path: Union[pathlib.Path, str]) pandas.DataFrame
_call_write(self, path: Union[pathlib.Path, str]) Optional[str]
classmethod _check_io_ok(cls, path: pathlib.Path, fmt: Optional[typeddfs.file_formats.FileFormat])
classmethod _get_fmt(cls, path: pathlib.Path) Optional[typeddfs.file_formats.FileFormat]
classmethod _get_io(cls, on, path: pathlib.Path, fmt: typeddfs.file_formats.FileFormat, custom, prefix: str)
classmethod _get_read_kwargs(cls, fmt: Optional[typeddfs.file_formats.FileFormat], path: pathlib.Path) Mapping[str, Any]
classmethod _get_write_kwargs(cls, fmt: Optional[typeddfs.file_formats.FileFormat], path: pathlib.Path) Mapping[str, Any]
pretty_print(self, fmt: Union[None, str, tabulate.TableFormat] = None, *, to: Optional[typeddfs.utils._utils.PathLike] = None, mode: str = 'w', **kwargs) str

Outputs a pretty table using the tabulate package.

Parameters
  • fmt – A tabulate format; if None, chooses according to to, falling back to "plain"

  • to – Write to this path (.gz, .zip, etc. is inferred)

  • mode – Write mode: β€˜w’, β€˜a’, or β€˜x’

  • kwargs – Passed to tabulate

Returns

The formatted string