tlc.core.export.exporters.csv

Exporter for the CSV format.

Module Contents

Classes

Class

Description

CSVExporter

Exporter for the CSV format.

API

class CSVExporter

Bases: tlc.core.export.exporter.Exporter

Exporter for the CSV format.

priority = 1
supported_format = csv
classmethod can_export(
table: Table,
output_url: Url,
) bool
classmethod serialize(
table: Table,
output_url: Url,
weight_threshold: float = 0.0,
dialect: str | Dialect | type[Dialect] = 'excel',
exclude_header: bool = False,
**kwargs: Any,
) str

Serialize a table to a CSV string.

Parameters:
  • table – The table to serialize

  • weight_threshold – The minimum weight of a row to be included in the output

  • dialect – The dialect to use for the CSV output. This can be a string like “excel” or “unix”. If you are not using the CLI tool, but are instead using the Python API, you can also pass a Dialect object or a subclass of Dialect.

  • exclude_header – Exclude the header row in the output

Returns:

A CSV string representing the table