bugfix
This commit is contained in:
parent
a03036b494
commit
51991e4342
|
@ -87,12 +87,15 @@ class DataSource:
|
||||||
]
|
]
|
||||||
|
|
||||||
def as_dict(self) -> dict:
|
def as_dict(self) -> dict:
|
||||||
|
"""
|
||||||
|
Return the contents of the data source as a dict.
|
||||||
|
"""
|
||||||
data = dict()
|
data = dict()
|
||||||
for name in self.data.keys():
|
for name in self.data.keys():
|
||||||
entries = self.get_entries(name, rand=False)
|
entries = self.get_entries(name, rand=False)
|
||||||
headers = self.headers
|
headers = self.headers
|
||||||
for i in range(0, len(self.headers) - len(entries[0])):
|
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))}
|
items = {(k, v) for k, v in zip(self.headers, self.get_entries(name))}
|
||||||
print(items)
|
print(items)
|
||||||
data[name] = dict(items)
|
data[name] = dict(items)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user