可以将原始数据转换为图表数据的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)。

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java中的多个控制台或显示屏?   java Guava:是否可能不使用多重映射映射所有条目。索引()?   java转换键值对作为JSON响应的对象?   java读取一个文本文件,然后计算字母频率,并从高到低列出它们   java Apache CXF为客户提供SEI   java如何在SQL查询中“转义”整个字符串   将JavaServlet定义为主网页servlet注释不起作用   运行jar文件时发生java FileNotFoundException   java有两种加载FXML的方法;为什么一个比另一个更受欢迎?   java无法切换到timeofindia站点页面中的帧   java Firebase Firestore在连接丢失后需要很长时间才能重新连接   java使用来自SQLite的通用数据填充RecyclerView/ListView   当我使用offer和poll独占访问它时,java是LinkedList线程安全的吗?   如何使用包含Java命名空间的XPath检索XML数据?   Spring Boot的java Elasticsearch Searchguard配置   java数组中的数组值赋值?   java保存成功,但更新失败使用Jointable的多对多Spring JPA和额外列   kotlin什么是java。构造器。单()?   简单解析例程的java问题