Fix serialization
This commit is contained in:
parent
f15c4cdcd9
commit
ed9f9f4c5a
|
@ -29,6 +29,8 @@ def to_excel(data: T.List[Details]) -> bytes:
|
||||||
df = pd.DataFrame(data, columns=mapping)
|
df = pd.DataFrame(data, columns=mapping)
|
||||||
df["status"] = df["status"].map(lambda x: x.value)
|
df["status"] = df["status"].map(lambda x: x.value)
|
||||||
df.set_index("th_arrival", inplace=True)
|
df.set_index("th_arrival", inplace=True)
|
||||||
|
df.rename(columns=mapping, inplace=True)
|
||||||
|
df = df.rename_axis(index=mapping["th_arrival"])
|
||||||
|
|
||||||
with NamedTemporaryFile() as tmp:
|
with NamedTemporaryFile() as tmp:
|
||||||
df.to_excel(tmp)
|
df.to_excel(tmp)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user