Skip to content

Commit

Permalink
Add export function to Labels class
Browse files Browse the repository at this point in the history
  • Loading branch information
eberrigan committed Mar 21, 2024
1 parent c998d3d commit d2b658c
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions sleap/io/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2055,6 +2055,21 @@ def export(self, filename: str):

SleapAnalysisAdaptor.write(filename, self)


def export_csv(self, filename: str):
"""Export labels to CSV format.
Args:
filename: Output path for the CSV format file.
Notes:
This will write the contents of the labels out as a CSV file.
"""
from sleap.io.format.csv import CSVAdaptor

CSVAdaptor.write(filename, self)


def export_nwb(
self,
filename: str,
Expand Down

0 comments on commit d2b658c

Please sign in to comment.