Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Commit

Permalink
Drop index row if index equals Cost Tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Justin Nielsen committed Jul 27, 2022
1 parent fbb04e0 commit 1a66d87
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/lambda.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down

0 comments on commit 1a66d87

Please sign in to comment.