可以将原始数据转换为图表数据的Python库
datatoaster的Python项目详细描述
#数据烘烤器
[![构建状态](https://travis-ci.org/abc612008/datatoaster.svg?branch=master)(https://travis-ci.org/abc612008/datatoaster)[![codecov](https://codecov.io/gh/abc612008/datatoaster/branch/master/graph/badge.svg)(https://codecov.io/gh/abc612008/datatoaster)[![许可证](https://img.shields.io/github/license/abc612008/datatoaster.svg)](https://github.com/abc612008/datatoaster/blob/master/license)
datatoaster是一个python 3库,可以将原始数据转换为图表数据,以便轻松生成图表。如果你喜欢这个项目或觉得它有用,请考虑给我一个“github”星。非常感谢!:)
欢迎提出建议!
/>
给定一个数据集,我想知道我的用户中有多少人支付了钱(每个操作系统)。
``python
>>data=[{“paidamount”:0,“os”:“ios”},{“paidamount”:0,“os”:“android”},{“paidamount”:301,“os”:“android”},{“paidamount”:0,“os”:“windows”},{“paidamount”:14,“os”:“windows”},{“paidamount”:56,“os”:“ios”},{“paidamount”:2,“os”:“windows”},{“paidamount”:0,“os”:“windows”}
>;>>datatoaster.data set(data)\
.set_x(lambda i:i[“os”])\
.set_y(datatoaster.dataset.percentagewithingroup)\
。添加限制(lambda i:i[“paidamount”]!=0)\
。get_result()
{windows:0.5,“i os”:0.5,“android”:0.5}
````
我还可以使用此数据绘制图表。
有关更多示例,可以运行“python3./demo/server.py`.
所需的x_值
data set.set_y(dataset.number of appearance/dataset.percentage/dataset.percentagewithingroup/function):set y值
numberofappearance:y值将是x的外观数。
percentage:y值将是x在整个数据集上的外观百分比。
percentagewithingroup:y值将是x在组中出现的百分比。
y22]}
data set.add_constraint(function,is_single):add a constraint
您可以参考[单元测试](https://github.com/abc612008/datatoaster/blob/master/tests/tests.py)或[演示](https://github.com/abc612008/datatoaster/blob/master/demo/server.py)了解更多示例。
许可证
datatoaster是在mit许可证下发布的。有关详细信息,请参阅[许可证](https://github.com/abc612008/datatoaster/blob/master/license)。
[![构建状态](https://travis-ci.org/abc612008/datatoaster.svg?branch=master)(https://travis-ci.org/abc612008/datatoaster)[![codecov](https://codecov.io/gh/abc612008/datatoaster/branch/master/graph/badge.svg)(https://codecov.io/gh/abc612008/datatoaster)[![许可证](https://img.shields.io/github/license/abc612008/datatoaster.svg)](https://github.com/abc612008/datatoaster/blob/master/license)
datatoaster是一个python 3库,可以将原始数据转换为图表数据,以便轻松生成图表。如果你喜欢这个项目或觉得它有用,请考虑给我一个“github”星。非常感谢!:)
欢迎提出建议!
/>
给定一个数据集,我想知道我的用户中有多少人支付了钱(每个操作系统)。
``python
>>data=[{“paidamount”:0,“os”:“ios”},{“paidamount”:0,“os”:“android”},{“paidamount”:301,“os”:“android”},{“paidamount”:0,“os”:“windows”},{“paidamount”:14,“os”:“windows”},{“paidamount”:56,“os”:“ios”},{“paidamount”:2,“os”:“windows”},{“paidamount”:0,“os”:“windows”}
>;>>datatoaster.data set(data)\
.set_x(lambda i:i[“os”])\
.set_y(datatoaster.dataset.percentagewithingroup)\
。添加限制(lambda i:i[“paidamount”]!=0)\
。get_result()
{windows:0.5,“i os”:0.5,“android”:0.5}
````
我还可以使用此数据绘制图表。
有关更多示例,可以运行“python3./demo/server.py`.
所需的x_值
data set.set_y(dataset.number of appearance/dataset.percentage/dataset.percentagewithingroup/function):set y值
numberofappearance:y值将是x的外观数。
percentage:y值将是x在整个数据集上的外观百分比。
percentagewithingroup:y值将是x在组中出现的百分比。
y22]}
data set.add_constraint(function,is_single):add a constraint
您可以参考[单元测试](https://github.com/abc612008/datatoaster/blob/master/tests/tests.py)或[演示](https://github.com/abc612008/datatoaster/blob/master/demo/server.py)了解更多示例。
许可证
datatoaster是在mit许可证下发布的。有关详细信息,请参阅[许可证](https://github.com/abc612008/datatoaster/blob/master/license)。