diff --git a/rolltable/tables.py b/rolltable/tables.py index df5f191..3ffa5c4 100644 --- a/rolltable/tables.py +++ b/rolltable/tables.py @@ -87,12 +87,15 @@ class DataSource: ] def as_dict(self) -> dict: + """ + Return the contents of the data source as a dict. + """ data = dict() for name in self.data.keys(): entries = self.get_entries(name, rand=False) headers = self.headers for i in range(0, len(self.headers) - len(entries[0])): - headers.append(f"{i:3f}", i) + headers.append(f"{i:3f}") items = {(k, v) for k, v in zip(self.headers, self.get_entries(name))} print(items) data[name] = dict(items)