本文整理汇总了Python中bamboo.models.observation.Observation.save方法的典型用法代码示例。如果您正苦于以下问题:Python Observation.save方法的具体用法?Python Observation.save怎么用?Python Observation.save使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类bamboo.models.observation.Observation
的用法示例。
在下文中一共展示了Observation.save方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _save_records
# 需要导入模块: from bamboo.models.observation import Observation [as 别名]
# 或者: from bamboo.models.observation.Observation import save [as 别名]
def _save_records(self):
Observation.save(self.get_data('good_eats.csv'),
self.dataset)
records = Observation.find(self.dataset)
self.assertTrue(isinstance(records, list))
self.assertTrue(isinstance(records[0], dict))
self.assertTrue('_id' in records[0].keys())
return records
示例2: test_save_over_bulk
# 需要导入模块: from bamboo.models.observation import Observation [as 别名]
# 或者: from bamboo.models.observation.Observation import save [as 别名]
def test_save_over_bulk(self):
Observation.save(self.get_data('good_eats_large.csv'),
self.dataset)
records = Observation.find(self.dataset)
self.assertEqual(len(records), 1001)
示例3: _save_observations
# 需要导入模块: from bamboo.models.observation import Observation [as 别名]
# 或者: from bamboo.models.observation.Observation import save [as 别名]
def _save_observations(self):
return Observation.save(
recognize_dates(self.get_data('good_eats.csv')), self.dataset)
示例4: save_observations
# 需要导入模块: from bamboo.models.observation import Observation [as 别名]
# 或者: from bamboo.models.observation.Observation import save [as 别名]
def save_observations(self, dframe):
"""Save rows in `dframe` for this dataset.
:param dframe: DataFrame to save rows from.
"""
return Observation.save(dframe, self)
示例5: save_observations
# 需要导入模块: from bamboo.models.observation import Observation [as 别名]
# 或者: from bamboo.models.observation.Observation import save [as 别名]
def save_observations(self, dframe):
"""Save rows in `dframe` for this dataset."""
Observation.save(dframe, self)
return self.dframe()