JAMB registration numbers ************************* :nodoctest: JAMB data is stored in a JAMBDataTable. We can import JAMB registration data from a regular CSV file: >>> datafile = 'jambsample.csv' >>> open(datafile, 'wb').write( ... '''reg_no,fst_sit_fname,lastname,firstname,middlenames,sex,date_of_birth,jamb_state,jamb_lga,course1,screening_date,screening_venue,entry_session,screening_type ... 91100546DD,ISUOSUO MOSES ODOMERO,ISUOSUO,MOSES,ODOMERO,M,25/5/1982,DEL,ISO-S,BSCPOL,2009/09/25 09:00:00 GMT+1,REPRINT SLIP AS FROM WED 23/09/2009,9,pde ... 91111834CC,DURUIHEOMA AUGUSTINA ADANNA,DURUIHEOMA,AUGUSTINA,ADANNA,F,15/4/1986,IMO,MBAIT,BSCPOL,2009/09/25 09:00:00 GMT+1,REPRINT SLIP AS FROM WED 23/09/2009,9,pde ... 91109351AC,ARISERE EBIKEBUNA COMFORT,ARISERE,EBIKEBUNA,COMFORT,F,6/1/1984,EDO,OV-SW,BSCPOL,2009/09/25 09:00:00 GMT+1,REPRINT SLIP AS FROM WED 23/09/2009,9,pde ... ''') Now we create a JAMBDataTable and import the data: >>> from waeup.sirp.jambtables import JAMBDataTable >>> table = JAMBDataTable() >>> len(list(table)) 0 >>> table.importFromCSV(datafile) >>> len(list(table)) 3 We can get the entries from the table as an iterator: >>> for x in table: ... print x We can delete the table: >>> del JAMBDataTable Clean up: >>> import os >>> os.unlink(datafile)