import json from tabulate import tabulate ##Property of pcondemand.com 2022, all rights reserved.## master=[] list1=open('house.json') list1=json.load(list1) for names in list1: temp={} #print(names) temp['Representative']=names['representative'] temp['Transaction']=names['transaction_date'] temp['Asset']=names['asset_description'] temp['Ticker']=names['ticker'] temp['Amount']=names['amount'] temp['Type']=names['type'] master.append(temp) print(names['representative'],names['transaction_date'],names['asset_description'],names['ticker'],names['amount'],names['type']) master1=(sorted(master, key=lambda i: i['Representative'])) file1=(tabulate(master1, headers="keys", tablefmt="html")) file3='''Members' tranactions | v2.0''' file4='''

pcod''' file1=file3+file1+file4 with open('house.html',"w") as fp: fp.write(file1)