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


Python Calculation.find方法代碼示例

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


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

示例1: calculations

# 需要導入模塊: from bamboo.models.calculation import Calculation [as 別名]
# 或者: from bamboo.models.calculation.Calculation import find [as 別名]
    def calculations(self, include_aggs=True, only_aggs=False):
        """Return the calculations for this dataset.

        :param include_aggs: Include aggregations, default True.
        :param only_aggs: Exclude non-aggregations, default False.
        """
        return Calculation.find(self, include_aggs, only_aggs)
開發者ID:zbyufei,項目名稱:bamboo,代碼行數:9,代碼來源:dataset.py

示例2: test_save

# 需要導入模塊: from bamboo.models.calculation import Calculation [as 別名]
# 或者: from bamboo.models.calculation.Calculation import find [as 別名]
 def test_save(self):
     record = self._save_observations_and_calculation()
     self.assertTrue(isinstance(record, dict))
     self.assertTrue(Calculation.FORMULA in record.keys())
     self.assertTrue(Calculation.STATE in record.keys())
     record = Calculation.find(self.dataset)[0].record
     self.assertEqual(record[Calculation.STATE], Calculation.STATE_READY)
     self.assertTrue(Calculation(record).is_ready)
開發者ID:astrorobotics,項目名稱:bamboo,代碼行數:10,代碼來源:test_calculation.py

示例3: test_save_set_aggregation_id

# 需要導入模塊: from bamboo.models.calculation import Calculation [as 別名]
# 或者: from bamboo.models.calculation.Calculation import find [as 別名]
 def test_save_set_aggregation_id(self):
     record = self._save_observations_and_calculation('max(amount)')
     agg_id = self.dataset.aggregated_datasets_dict['']
     calculation = Calculation.find(self.dataset)[0]
     self.assertEqual(agg_id, calculation.aggregation_id)
開發者ID:astrorobotics,項目名稱:bamboo,代碼行數:7,代碼來源:test_calculation.py

示例4: test_save_set_aggregation

# 需要導入模塊: from bamboo.models.calculation import Calculation [as 別名]
# 或者: from bamboo.models.calculation.Calculation import find [as 別名]
 def test_save_set_aggregation(self):
     record = self._save_observations_and_calculation('max(amount)')
     calculation = Calculation.find(self.dataset)[0]
     self.assertEqual('max', calculation.aggregation)
開發者ID:astrorobotics,項目名稱:bamboo,代碼行數:6,代碼來源:test_calculation.py

示例5: test_find

# 需要導入模塊: from bamboo.models.calculation import Calculation [as 別名]
# 或者: from bamboo.models.calculation.Calculation import find [as 別名]
 def test_find(self):
     record = self._save_observations_and_calculation()
     rows = Calculation.find(self.dataset)
     new_record = rows[0].record
     status = new_record.pop(Calculation.STATE)
     self.assertEqual(status, Calculation.STATE_READY)
開發者ID:astrorobotics,項目名稱:bamboo,代碼行數:8,代碼來源:test_calculation.py

示例6: action

# 需要導入模塊: from bamboo.models.calculation import Calculation [as 別名]
# 或者: from bamboo.models.calculation.Calculation import find [as 別名]
        def action(dataset):
            result = Calculation.find(dataset)

            return [x.clean_record for x in result]
開發者ID:4sp1r3,項目名稱:bamboo,代碼行數:6,代碼來源:calculations.py

示例7: calculations

# 需要導入模塊: from bamboo.models.calculation import Calculation [as 別名]
# 或者: from bamboo.models.calculation.Calculation import find [as 別名]
 def calculations(self):
     """Return the calculations for this dataset."""
     return Calculation.find(self)
開發者ID:j,項目名稱:bamboo,代碼行數:5,代碼來源:dataset.py


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