def variableProdToDatabase(filename,tablename): startTime = int(time.time()) array = excelToArray(files.inputFilePath(filename)) thelist = convertVariableProdToList(array) database.createVariableProdTable(tablename,thelist) endTime = int(time.time()) print 'Loaded %s into database table %s in %s seconds' % (filename,tablename,(endTime-startTime))
def importTo2DArray(filename): return excelToArray(files.inputFilePath(filename))
def import_year_forecasts(filename): array = excelToArray(files.inputFilePath(filename)) forecast_map = {} for row in array: forecast_map[row[0]] = row[1:] return forecast_map