与表格格式数据有关的 Python 库 Tablib
- 授权协议: MIT
- 开发语言: Python
- 操作系统: 跨平台
- 软件首页: http://docs.python-tablib.org/en/latest/
- 软件文档: http://docs.python-tablib.org/en/latest/
软件介绍
Tablib 是一个与表格格式数据有关的 Python 库,允许导入、导出、管理表格格式数据。
特性
1 导出/导入格式
Excel (Sets + Books)
JSON (Sets + Books)
YAML (Sets + Books)
HTML (Sets)
TSV (Sets)
CSV (Sets)
2 数据操作
切片
定义动态列
过滤
格式化
示例
准备数据
headers = ('first_name', 'last_name')
data = [
('John', 'Adams'),
('George', 'Washington')
]
data = tablib.Dataset(*data, headers=headers)添加新行
data.append(('Henry', 'Ford'))添加新的一列
data.append_col((90, 67, 83), header='age')
导出json
>>> print data.json
[
{
"last_name": "Adams",
"age": 90,
"first_name": "John"
},
{
"last_name": "Ford",
"age": 83,
"first_name": "Henry"
}
]导出xls文件
with open('grades.xls', 'wb') as f:
f.write(tests.xls)
Traction: A Startup Guide to Getting Customers
Gabriel Weinberg、Justin Mares / S-curves Publishing / 2014-8-25 / USD 14.99
Most startups end in failure. Almost every failed startup has a product. What failed startups don't have is traction -- real customer growth. This book introduces startup founders and employees to......一起来看看 《Traction: A Startup Guide to Getting Customers》 这本书的介绍吧!
