diff --git a/latecomers/serializer.py b/latecomers/serializer.py index ac0372f..a96cbf7 100644 --- a/latecomers/serializer.py +++ b/latecomers/serializer.py @@ -29,6 +29,8 @@ def to_excel(data: T.List[Details]) -> bytes: df = pd.DataFrame(data, columns=mapping) df["status"] = df["status"].map(lambda x: x.value) 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: df.to_excel(tmp)