In [2]:
import csv

def read_building(fname):
    with open(fname) as f:
        data = csv.reader(f,delimiter=',')
        #print(data)
        for row in data:
            #print(row)
            print("insert into BUILDING values ('"+row[0].strip()+"','"+row[1].strip()+"');")

def main():
    read_building("building-codes.csv")

main()
insert into BUILDING values ('25PP','25 Park Place');
insert into BUILDING values ('ADHOLD','Adherhold Learning Center');
insert into BUILDING values ('ARTS','Art & Humanities Bldg');
insert into BUILDING values ('CLSO','Classroom South Bldg');
insert into BUILDING values ('COE','College of Education');
insert into BUILDING values ('COMMON','University Commons');
insert into BUILDING values ('KELL','Kell Hall');
insert into BUILDING values ('LANGDL','Langdale Hall');
insert into BUILDING values ('LIBSO','Library South');
insert into BUILDING values ('NSC','Natural Science Center');
insert into BUILDING values ('PIED','Piedmont Hall');
insert into BUILDING values ('PSC','Petit Science Building');
insert into BUILDING values ('SPARKS','Sparks Hall');
insert into BUILDING values ('URBAN','Urban Life Bldg');
In [3]:
import csv

def read_media(fname):
  with open(fname) as f:
    data = csv.reader(f,delimiter=',')
    for row in data:
      print("insert into MEDIA values ('"+row[0].strip()+"','"+row[1].strip()+"');")

def main():
  read_media("media-codes.csv")

main()
insert into MEDIA values ('BR','Blu-Ray Player');
insert into MEDIA values ('CB','Chalk Board');
insert into MEDIA values ('DC','Document Camera');
insert into MEDIA values ('DVD','DVD Capabilities through IWS or Player');
insert into MEDIA values ('ELMO','Elmo Device');
insert into MEDIA values ('IWS','Instructor Workstation (Network)');
insert into MEDIA values ('LAC','Laptop to AUX Connectivity');
insert into MEDIA values ('LC','Lecture Capture/Video Confrencing Camera and Mic');
insert into MEDIA values ('M','Map');
insert into MEDIA values ('MWB','Mobile White Board');
insert into MEDIA values ('NP','Network Port w/ charging station at each seat');
insert into MEDIA values ('PS','Plasma Screen');
insert into MEDIA values ('SWS','Student Workstation');
insert into MEDIA values ('TP','Transparency Projector');
insert into MEDIA values ('TV','TV for DVD/VCR');
insert into MEDIA values ('VCR','VHS Capabilities through Player or Combo');
insert into MEDIA values ('VP','Video Projector (Digital)');
insert into MEDIA values ('WB','White Board');
insert into MEDIA values ('WP','Wireless presentation system');
insert into MEDIA values ('WT','Wall Talker');
In [ ]: