当前位置: 首页>>代码示例>>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;未经允许,请勿转载。