Esempio n. 1
0
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))
Esempio n. 2
0
def importTo2DArray(filename):
	return excelToArray(files.inputFilePath(filename))
Esempio n. 3
0
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