Next Previous Up Contents
Next: CDF
Up: Supported Input Formats
Previous: VOTable ECSV

The Enhanced Character Separated Values format was developed within the Astropy project and is described at It is composed of a YAML header followed by a CSV-like body, and is intended to be a human-readable and maybe even human-writable format with rich metadata. Most of the per-column and per-table metadata used by TOPCAT is preserved when de/serializing to this format. TOPCAT currently supports ECSV 0.9.

There are various ways to format the YAML header, but a simple example of an ECSV file looks like this:

# %ECSV 0.9
# ---
# delimiter: ','
# datatype: [
#   { name: index,   datatype: int32   }, 
#   { name: Species, datatype: string  },
#   { name: Name,    datatype: string  },
#   { name: Legs,    datatype: int32   },
#   { name: Height,  datatype: float64, unit: m },
#   { name: Mammal,  datatype: bool    },
# ]
If you follow this pattern, it's possible to write your own ECSV files by taking an existing CSV file and decorating it with a header that gives column datatypes, and possibly other metadata such as units. This allows you to force the datatype of given columns (the CSV reader guesses datatype based on content, but can get it wrong) and also allows TOPCAT to read the file much more efficiently, and to recognise the file format automatically.

The datatypes that work well with TOPCAT are bool, int8, int16, int32, int64, float32, float64 and string.

Next Previous Up Contents
Next: CDF
Up: Supported Input Formats
Previous: VOTable

TOPCAT - Tool for OPerations on Catalogues And Tables
Starlink User Note253
TOPCAT web page:
Author email:
Mailing list: