fromcollectionsimportUserDictfromtabulateimporttabulate__all__=["Row",]"""Row structure based on UserDict."""
[docs]classRow(UserDict):""" This class is useful for printing and working with individual rows of a of an aku.DataFrame. """def__str__(self):""" Return ascii-formatted version of the dataframe. """returntabulate(self.items(),headers=["keys","values"],showindex=False)def__repr__(self):returndict(self).__repr__()def_repr_html_(self):""" Return html-formatted version of the dataframe. """headers=["keys","values"]returntabulate(self.items(),headers=headers,tablefmt="html",showindex=False)