import json
return json.dumps(self.to_dict_with_more())
-
- def to_row(self):
+ def to_row(self, tags):
row = []
_dict = self.to_dict_with_more()
- for tag in _dict:
+ for tag in tags:
if tag in _dict.keys():
row.append(_dict[tag])
else:
'grapher_id': 'waveform_centroid',
'width': 346,
'height': 130}))
-
# One ID only
identifiers = self.identifiers.all()
if identifiers:
return metadata
- def to_row(self):
+ def to_row(self, tags):
row = []
_dict = self.to_dict_with_more()
- for tag in _dict:
+ for tag in tags:
if tag in _dict.keys():
row.append(_dict[tag])
else:
def output(self):
yield self.writer.writerow(self.tags)
for element in self.elements:
- yield self.writer.writerow(_stringify_list(element.to_row(), self.encoding))
+ yield self.writer.writerow(_stringify_list(element.to_row(self.tags), self.encoding))
class Echo(object):