Created
June 8, 2020 21:58
-
-
Save ottomata/828f08a145a2744612b0ba44b38dbc73 to your computer and use it in GitHub Desktop.
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
# schedule be keys.txt | |
committed_id | |
money_for_baths | |
# OR | |
keys = ['committee_id', 'money_for_baths'] | |
transformed_list_of_dict = | |
[ | |
{commitee_id: 123, otherthing: woohoo, money_for_baths: 500}, | |
... | |
] | |
rows = [] | |
for dict_entry in transformed_list_of_dict: | |
# entry will be each dict in the list | |
# {commitee_id: 123, oth ... | |
# ... | |
row = [] | |
for key in keys: | |
# key will be committee_id, then money_for_baths | |
row.append(dict_entry[key]) | |
rows.append(row) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment