本文整理汇总了Python中pybabe.Babe.head方法的典型用法代码示例。如果您正苦于以下问题:Python Babe.head方法的具体用法?Python Babe.head怎么用?Python Babe.head使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pybabe.Babe
的用法示例。
在下文中一共展示了Babe.head方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_load_partition
# 需要导入模块: from pybabe import Babe [as 别名]
# 或者: from pybabe.Babe import head [as 别名]
def test_load_partition(self):
start_time = "2012-04-23 11:00"
end_time = "2012-04-23 12:00"
a = Babe().pull_kontagent(start_time, end_time, sample_mode=True)
a = a.head(n=10)
d = {}
a.push(stream_dict=d, format="csv")
self.assertEquals(list(d.keys()), ["2012-04-23_11"])
示例2: test_load
# 需要导入模块: from pybabe import Babe [as 别名]
# 或者: from pybabe.Babe import head [as 别名]
def test_load(self):
start_time = '2012-04-23 11:00'
end_time = '2012-04-23 12:00'
a = Babe().pull_kontagent(start_time, end_time, sample_mode=True)
buf = StringIO()
a = a.head(n=10)
a.push(stream=buf, format='csv')
print buf.getvalue()
示例3: test_buzzdata
# 需要导入模块: from pybabe import Babe [as 别名]
# 或者: from pybabe.Babe import head [as 别名]
def test_buzzdata(self):
a = Babe().pull(protocol='buzzdata',
dataroom='best-city-contest-worldwide-cost-of-living-index',
uuid='aINAPyLGur4y37yAyCM7w3',
username='eiu', format='xls')
a = a.head(2)
buf = StringIO()
a.push(stream=buf, format='csv')
示例4: test_buzzdata
# 需要导入模块: from pybabe import Babe [as 别名]
# 或者: from pybabe.Babe import head [as 别名]
def test_buzzdata(self):
a = Babe().pull(
protocol="buzzdata",
dataroom="best-city-contest-worldwide-cost-of-living-index",
uuid="aINAPyLGur4y37yAyCM7w3",
username="eiu",
format="xls",
)
a = a.head(2)
a.to_string()
示例5: test_load
# 需要导入模块: from pybabe import Babe [as 别名]
# 或者: from pybabe.Babe import head [as 别名]
def test_load(self):
start_time = "2012-04-23 11:00"
end_time = "2012-04-23 12:00"
a = Babe().pull_kontagent(start_time, end_time, sample_mode=True)
a = a.head(n=10)
print a.to_string()
示例6: test_airport
# 需要导入模块: from pybabe import Babe [as 别名]
# 或者: from pybabe.Babe import head [as 别名]
def test_airport(self):
a = Babe().pull(filename='data/airports.csv')
a = a.primary_key_detect()
a = a.head(n=10)
a.to_string()
示例7: test_airport
# 需要导入模块: from pybabe import Babe [as 别名]
# 或者: from pybabe.Babe import head [as 别名]
def test_airport(self):
a = Babe().pull(filename='data/airports.csv')
a = a.primary_key_detect()
a = a.head(n=10)
buf = StringIO()
a.push(stream=buf, format='csv')