MCPcopy
hub / github.com/treeverse/dvc / to_csv

Method to_csv

dvc/compare.py:141–151  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

139 return not any(item != self._fill_value for item in col)
140
141 def to_csv(self) -> str:
142 import csv
143 from io import StringIO
144
145 buff = StringIO()
146 writer = csv.writer(buff)
147 writer.writerow(self.keys())
148
149 for row in self:
150 writer.writerow(row)
151 return buff.getvalue()
152
153 def add_column(self, name: str) -> None:
154 self._columns[name] = Column([self._fill_value] * len(self))

Callers 3

renderMethod · 0.95
test_table_emptyFunction · 0.95
test_list_operationsFunction · 0.95

Calls 1

keysMethod · 0.95

Tested by 2

test_table_emptyFunction · 0.76
test_list_operationsFunction · 0.76