sleap.io.format.csv#
Adaptor for writing SLEAP analysis as csv.
- class sleap.io.format.csv.CSVAdaptor[source]#
- property all_exts#
List of all file extensions supported by adaptor.
- can_read_file(file: FileHandle)[source]#
Returns whether this adaptor can read this file.
- can_write_filename(filename: str)[source]#
Returns whether this adaptor can write format of this filename.
- property default_ext#
The default file extension, e.g., ‘json’ (without ‘.’).
- property handles#
Returns the type of object that can be read/written.
The Dispatch class calls this method on all registered adaptors to determine which to use for reading/writing.
- property name#
Human-reading name of the file format
- classmethod write(filename: str, source_object: Labels, source_path: Optional[str] = None, video: Optional[Video] = None)[source]#
Writes csv file for
Labels
source_object
.- Parameters:
filename – The filename for the output file.
source_object – The
Labels
from which to get data from.source_path – Path for the labels object
video – The
Video
from which toget data from. If novideo
is specified, then the first video insource_object
videos list will be used. If there are noLabeled Frame`s in the `video
, then no analysis file will be written.