This commit is contained in:
evilchili 2023-12-22 21:27:36 -08:00
parent a03036b494
commit 51991e4342

View File

@ -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)