Created
December 13, 2017 15:19
-
-
Save samkit-jain/5242e39a30d3520f73c735fdcdb203a3 to your computer and use it in GitHub Desktop.
This file contains 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
# ----- get header row ----- # | |
# list to contain all headers | |
headers = [] | |
# iterate over all rows | |
for row in rows: | |
if last column empty: | |
headers.append(rows) | |
else: | |
break | |
# ----- remove headers ----- # | |
valid_transactions = [] # list to contain valid transactions | |
# iterate over all rows | |
for row in rows: | |
if row not in headers: | |
valid_transactions.append(row) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment