本文整理汇总了Python中Analysis.writeData方法的典型用法代码示例。如果您正苦于以下问题:Python Analysis.writeData方法的具体用法?Python Analysis.writeData怎么用?Python Analysis.writeData使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Analysis
的用法示例。
在下文中一共展示了Analysis.writeData方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: import Analysis [as 别名]
# 或者: from Analysis import writeData [as 别名]
#.........这里部分代码省略.........
self.size = None
self.color = None
#check to see if there is any data in the set after filters applied
if( self.dataObject.filtersize() == 0):
tkMessageBox.showwarning("No data!","Remove Filters from the data or load a different data set!")
return
print "handling command button 4"
# run pca on all of the numerical data
self.Analysis = Analysis(name = "PCA", data = self.dataObject.getData_num())
#dictioanry that will store the headers for the pca analsysis plots
self.pcadataHeader = {}
# this will run the dialog for pca
inputBox = PCADialog(parent = self.root, pcaDataHeader = self.pcadataHeader, displayClass = self, Analysis = self.Analysis)
if( self.pcadataHeader['check'] == True):
self.xAxisLabel.set( self.pcadataHeader.get('x') )
self.yAxisLabel.set( self.pcadataHeader.get('y') )
z = self.pcadataHeader.get('z')
#z is optional
if( z == None ):
z = ""
self.zAxisLabel.set(z)
self.buildLabels()
#graphs the pca points
self.buildPCA()
if( self.pcadataHeader.get('saveData') ):
filename = self.pcadataHeader.get('filename')
filename = filename + ".csv"
self.Analysis.writeData(filename = filename)
#This method will open up the filter choice menu dialog where the user will
#be able to choose which fitlers to add/remove from the data.
#this will also have an option for removing missing data.
def filterData(self, event=None):
#check to see if the data is loaded
test = self.checkData()
if( test == False):
return
a = filterDialog(parent = self.root, displayClass = self, dataObj = self.dataObject, title = "Filter")
return
# This method will open the countInfo Dialog box where the user can count the number
# of data points that meet two conditions which will be saved in the data object
def countData(self, event = None):
#check to see if the data is loaded
test = self.checkData()
if( test == False):
return
#open dialog
temp = countInfo(parent = self.root, dataObject = self.dataObject, title = "Count Occurrences within the Data:")
return
# this method will run the kmeans clustering algorithm on the loaded data
# a popup dialog will appear with options for the user to choose which columns
# to run on the kmeans clustering. Default being use all numeric columns
# the user can also choose the number of clusters to have and the name
# of this cluster run
def handleCmd1(self, event = None):
#check to see if the data is loaded
test = self.checkData()