當前位置: 首頁>>代碼示例>>Python>>正文


Python MOSES.getPiggyBankWithFilters方法代碼示例

本文整理匯總了Python中MOSES.getPiggyBankWithFilters方法的典型用法代碼示例。如果您正苦於以下問題:Python MOSES.getPiggyBankWithFilters方法的具體用法?Python MOSES.getPiggyBankWithFilters怎麽用?Python MOSES.getPiggyBankWithFilters使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在MOSES的用法示例。


在下文中一共展示了MOSES.getPiggyBankWithFilters方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: pullData

# 需要導入模塊: import MOSES [as 別名]
# 或者: from MOSES import getPiggyBankWithFilters [as 別名]
 def pullData(self):
     #print "Pulling data!"
     self.pull_button.setEnabled(False)
     self.piggybank_summarizer.setEnabled(False)
     self.piggybank.showDataFrame(None)
     message = "processing..."
     self.status.setText(message)
     self.alertMessage("Please Wait","Depending on the filters you have chosen, this step could take a second or a minute, though definitely not more than 60s. Please wait, and remember, <i>Roma die uno non aedificata est</i>.")
     filters = self.getFilters()
     data = MOSES.getPiggyBankWithFilters(self.user_id, self.password, filters)
     if data is None:
         message = "No data for selected filters."
         self.status.setText(message)            
         self.alertMessage("No Data Available","There is no data pertaining to the selected filters. This could have occurred for several reasons:\n1. You may have selected too many filters which have no result, or\n2. You could have selected a date range between which there have been no articles.")        
     else:
         if data.shape[0] <=0:
             self.status.setText(message)            
             message = "No data for selected filters."
             self.alertMessage("No Data Available","There is no data pertaining to the selected filters. This could have occurred for several reasons:\n1. You may have selected too many filters which have no result, or\n2. You could have selected a date range between which there have been no articles, or, simply\n3. There is no data.")
         else:            
             self.piggybank_data = data
             self.piggybank.showDataFrame(self.piggybank_data)
             #populate the summary next.
             self.piggybank_summarizer.setEnabled(True)
             self.piggybank_summarizer.setPiggyBank(data)
             message = "Retrieved %d rows of data pertaining to your filters."%(data.shape[0])
             self.alertMessage("Retrieved Data",message)
             self.status.setText(message)
             #self.summarize()
     self.pull_button.setEnabled(True)
開發者ID:vinay87,項目名稱:oink,代碼行數:32,代碼來源:PiggyBankWithFilter.py


注:本文中的MOSES.getPiggyBankWithFilters方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。