本文整理汇总了Python中DataManager.DataManager.binaryTree方法的典型用法代码示例。如果您正苦于以下问题:Python DataManager.binaryTree方法的具体用法?Python DataManager.binaryTree怎么用?Python DataManager.binaryTree使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataManager.DataManager
的用法示例。
在下文中一共展示了DataManager.binaryTree方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: DataExplorerUserInputLoop
# 需要导入模块: from DataManager import DataManager [as 别名]
# 或者: from DataManager.DataManager import binaryTree [as 别名]
def DataExplorerUserInputLoop(self):
"""
Create a loop asking the user which action he or she wants to take. The loop is break (and the program ends) whenever the user type quit.
"""
userInput=""
try:
while userInput != "quit":
self.printDataExploreOptions()
userInput = raw_input("\nPlease provide the input : ")
if userInput == "1":
DataExplorer.generalAnalysis(DataManager.cleaned_data,
DataManager.binaryTree(DataManager.cleaned_data))
elif userInput == "2":
DataExplorer.printVideoCategories()
userInputVideoCatagory = raw_input("\nPlease provide the number of the Video Catagory : ")
DataExplorer.individual_videocatagory_analysis(DataManager.cleaned_data , userInputVideoCatagory)
elif userInput == "3":
DataExplorer.printCategories()
userInputfeature = raw_input("\nPlease provide the number of the feature : ")
DataExplorer.individual_feature_analysis(DataManager.cleaned_data,userInputfeature)
elif userInput == "4":
self.InitiateFlow()
elif userInput == "quit":
self.ExitProgram()
except KeyboardInterrupt:
print "quitting..."
sys.exit()
示例2: FlowManager
# 需要导入模块: from DataManager import DataManager [as 别名]
# 或者: from DataManager.DataManager import binaryTree [as 别名]
#.........这里部分代码省略.........
self.InitiateFlow()
elif userInput == "4":
print "\nYou are now in the previous control"
self.InitiateFlow()
elif userInput == "quit":
self.ExitProgram()
else:
print "\nOops...Incorrect Input...Please enter correct Input !!!\n"
self.DataVisulizerUserInputLoop()
except KeyboardInterrupt:
print "quitting..."
sys.exit()
def printDataVisulizerOptions(self):
print "\nThis part of the program will explain you what are the main characteristics of our data and will show you the first 5 rows of our dataframe\n \
1) press 1 to start the Visualization \n \
4) press 4 to go back to main menu \n \
2) Enter 'quit' to exit from the program "
def DataExplorerUserInputLoop(self):
"""
Data Exploration Option loop
Ask the user which action he/she wants to take and initialize the appropriate analysis.
The loop is break (and the program ends) whenever the user types quit.
"""
userInput = ""
try:
while userInput != "quit":
self.printDataExploreOptions()
userInput = raw_input("\nPlease provide the input : ")
if userInput == "1":
self.dataexplorer.generalAnalysis(self.datamanager.cleaned_data,
self.datamanager.binaryTree(self.datamanager.cleaned_data))
elif userInput == "2":
self.dataexplorer.printVideoCategories()
userInputVideoCatagory = raw_input("\nPlease provide the number of the Video Catagory : ")
self.dataexplorer.individual_videocatagory_analysis(self.datamanager.cleaned_data, userInputVideoCatagory)
elif userInput == "3":
self.dataexplorer.printFeatures()
userInputfeature = raw_input("\nPlease provide the number of the feature : ")
self.dataexplorer.individual_feature_analysis(self.datamanager.cleaned_data, userInputfeature)
elif userInput == "4":
print "\nYou are now in the previous control"
self.InitiateFlow()
elif userInput == "quit":
self.ExitProgram()
else:
print "\nOops...Incorrect Input...Please enter correct Input !!!\n"
self.DataExplorerUserInputLoop()
except KeyboardInterrupt:
print "quitting..."
sys.exit()
def printDataExploreOptions(self):
print "\nThis part of the program allows you to explore the data more deeply and perform many different analysis \n \
1) press 1 for general analysis \n \
2) press 2 for individual analyisis of each video catagory \n \
3) press 3 for individual feature analysis \n \
4) press 4 to go back to main menu \n \
5) Enter 'quit' to exit from the program "
def DataSimulatorUserInputLoop(self):
"""
Data Simulation Option loop