Created
April 11, 2018 14:27
-
-
Save litnimax/20059307b856f65776dcd1b11d5b649e to your computer and use it in GitHub Desktop.
TKS all operations parser
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import xlrd | |
import sys | |
res = {} | |
rb = xlrd.open_workbook(sys.argv[1]) | |
sheet = rb.sheet_by_index(0) | |
for rownum in range(sheet.nrows): | |
row = sheet.row(rownum) | |
d = row[0] | |
amount = row[4] | |
desc = row[11] | |
if amount.value > 2000: | |
#print d.value, amount.value, desc.value | |
if res.get(desc.value): | |
res[desc.value] += amount.value | |
else: | |
res[desc.value] = amount.value | |
for k,v in res.items(): | |
print k, v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment