Commit 6e5e59ae authored by panos's avatar panos

Example ammended based on the objects name changes

parent aebd4147
...@@ -24,9 +24,9 @@ Created on 20 Jun 2014 ...@@ -24,9 +24,9 @@ Created on 20 Jun 2014
from dream.KnowledgeExtraction.DistributionFitting import DistFittest from dream.KnowledgeExtraction.DistributionFitting import DistFittest
from dream.KnowledgeExtraction.DistributionFitting import Distributions from dream.KnowledgeExtraction.DistributionFitting import Distributions
from dream.KnowledgeExtraction.ImportExceldata import Import_Excel from dream.KnowledgeExtraction.ImportExceldata import ImportExceldata
from dream.KnowledgeExtraction.ExcelOutput import Output from dream.KnowledgeExtraction.ExcelOutput import ExcelOutput
from dream.KnowledgeExtraction.ReplaceMissingValues import HandleMissingValues from dream.KnowledgeExtraction.ReplaceMissingValues import ReplaceMissingValues
from dream.KnowledgeExtraction.JSONOutput import JSONOutput from dream.KnowledgeExtraction.JSONOutput import JSONOutput
import xlrd import xlrd
import json import json
...@@ -44,7 +44,7 @@ def main(test=0, ExcelFileName='inputData.xls', ...@@ -44,7 +44,7 @@ def main(test=0, ExcelFileName='inputData.xls',
worksheets = workbook.sheet_names() worksheets = workbook.sheet_names()
worksheet_ProcessingTimes = worksheets[0] #Define the worksheet with the Processing times data worksheet_ProcessingTimes = worksheets[0] #Define the worksheet with the Processing times data
inputData = Import_Excel() #Call the Python object Import_Excel inputData = ImportExceldata() #Call the Python object Import_Excel
ProcessingTimes = inputData.Input_data(worksheet_ProcessingTimes, workbook) #Create the Processing Times dictionary with key Machines 1,2 and values the processing time data ProcessingTimes = inputData.Input_data(worksheet_ProcessingTimes, workbook) #Create the Processing Times dictionary with key Machines 1,2 and values the processing time data
##Get from the above dictionaries the M1 key and define the following lists with data ##Get from the above dictionaries the M1 key and define the following lists with data
...@@ -52,7 +52,7 @@ def main(test=0, ExcelFileName='inputData.xls', ...@@ -52,7 +52,7 @@ def main(test=0, ExcelFileName='inputData.xls',
M2_ProcTime = ProcessingTimes.get('M2',[]) M2_ProcTime = ProcessingTimes.get('M2',[])
#Call the HandleMissingValues object and replace the missing values in the lists with the mean of the non-missing values #Call the HandleMissingValues object and replace the missing values in the lists with the mean of the non-missing values
misValues =HandleMissingValues() misValues = ReplaceMissingValues()
M1_ProcTime = misValues.ReplaceWithMean(M1_ProcTime) M1_ProcTime = misValues.ReplaceWithMean(M1_ProcTime)
M2_ProcTime = misValues.ReplaceWithMean(M2_ProcTime) M2_ProcTime = misValues.ReplaceWithMean(M2_ProcTime)
...@@ -91,7 +91,7 @@ def main(test=0, ExcelFileName='inputData.xls', ...@@ -91,7 +91,7 @@ def main(test=0, ExcelFileName='inputData.xls',
jsonFile.close() #It closes the file jsonFile.close() #It closes the file
#=================== Calling the ExcelOutput object, outputs the outcomes of the statistical analysis in xls files ==========================# #=================== Calling the ExcelOutput object, outputs the outcomes of the statistical analysis in xls files ==========================#
export=Output() export=ExcelOutput()
export.PrintStatisticalMeasures(M1_ProcTime,'M1_ProcTime_StatResults.xls') export.PrintStatisticalMeasures(M1_ProcTime,'M1_ProcTime_StatResults.xls')
export.PrintStatisticalMeasures(M2_ProcTime,'M2_ProcTime_StatResults.xls') export.PrintStatisticalMeasures(M2_ProcTime,'M2_ProcTime_StatResults.xls')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment