From 1a66d87c443fcb1c55692da92ad87dd81b3e09df Mon Sep 17 00:00:00 2001 From: Justin Nielsen Date: Wed, 27 Jul 2022 11:22:29 -0500 Subject: [PATCH] Drop index row if index equals Cost Tag --- src/lambda.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/lambda.py b/src/lambda.py index 29090f1..565c4b1 100644 --- a/src/lambda.py +++ b/src/lambda.py @@ -379,6 +379,10 @@ def generateExcel(self): workbook = writer.book for report in self.reports: print(report['Name'],report['Type']) + if (report['Data']).index.any() == f"{(report['Name'])}$": + print(f"Dropping {(report['Name'])}$ Index") + (report['Data']).drop(index=f"{(report['Name'])}$", inplace=True) + report['Data'].to_excel(writer, sheet_name=report['Name']) worksheet = writer.sheets[report['Name']] if report['Type'] == 'chart':