gen_data简介
来源:dev.to
时间:2024-09-29 09:54:43 216浏览 收藏
在IT行业这个发展更新速度很快的行业,只有不停止的学习,才不会被行业所淘汰。如果你是文章学习者,那么本文《gen_data简介》就很适合你!本篇内容主要包括##content_title##,希望对大家的知识积累有所帮助,助力实战开发!
介绍
gen_data是一个方便的工具,支持生成csv测试数据文件。
它可以用来生成一个非常大的数据文件用于测试目的。
usage: gen_data [-h] -r rows [-c columns] [-t titles] csvfile generate csv file with specfied number of rows, and column types. positional arguments: csvfile options: -h, --help show this help message and exit -r rows, --rows rows number of rows -c columns, --columns columns list of colume type, in this format: "t t t:n ..." where t is type (number), n is column length. -t titles, --titles titles list of column titles list of supported types: bool=1 int=2 string=3 float=4 date=5 datetime=6
如何设置?
# clone the repo git clone git@github.com:patfinder/gen_data.git # move to the tool source folder. then enter below command to setup the tool. # after this, gen_data will become a script command that you can execute directly. $ pip install -e . # show info of installed script $ pip show gen_data name: gen-data version: 0.0.1 summary: a convinient tool for generating big test data. home-page: https://github.com/patfinder/gen_data/ author: le vuong nguyen author-email: vuong.se@gmail.com license: unknown location: ~/myrepos/gen_data requires: required-by:
用法
# Show Help for the command $ gen_data --help # Run sample command to generate csv with 5 rows # and columns of (int, string, string with length of 20, int) and column titles $ gen_data f1.csv -r 5 -c"1,3,3:20,2" -t"is_active,name,job_desc,score" # Sample output of above command is f1.csv with below content $ cat f1.csv id,is_active,name,job_desc,score 1,False,Louis Martinez,Really tonight we.,559 2,True,Larry Williams,Moment word camera.,845 3,True,Brandon Williams,Wear your consumer.,677 4,False,Chelsea Zamora,Identify itself let.,384 5,True,Jonathan Collier MD,Offer popular.,502
终于介绍完啦!小伙伴们,这篇关于《gen_data简介》的介绍应该让你收获多多了吧!欢迎大家收藏或分享给更多需要学习的朋友吧~golang学习网公众号也会发布文章相关知识,快来关注吧!
声明:本文转载于:dev.to 如有侵犯,请联系study_golang@163.com删除
相关阅读
更多>
-
501 收藏
-
501 收藏
-
501 收藏
-
501 收藏
-
501 收藏
最新阅读
更多>
-
390 收藏
-
492 收藏
-
132 收藏
-
371 收藏
-
176 收藏
-
207 收藏
-
178 收藏
-
417 收藏
-
360 收藏
-
454 收藏
-
395 收藏
-
334 收藏
课程推荐
更多>
-
- 前端进阶之JavaScript设计模式
- 设计模式是开发人员在软件开发过程中面临一般问题时的解决方案,代表了最佳的实践。本课程的主打内容包括JS常见设计模式以及具体应用场景,打造一站式知识长龙服务,适合有JS基础的同学学习。
- 立即学习 542次学习
-
- GO语言核心编程课程
- 本课程采用真实案例,全面具体可落地,从理论到实践,一步一步将GO核心编程技术、编程思想、底层实现融会贯通,使学习者贴近时代脉搏,做IT互联网时代的弄潮儿。
- 立即学习 508次学习
-
- 简单聊聊mysql8与网络通信
- 如有问题加微信:Le-studyg;在课程中,我们将首先介绍MySQL8的新特性,包括性能优化、安全增强、新数据类型等,帮助学生快速熟悉MySQL8的最新功能。接着,我们将深入解析MySQL的网络通信机制,包括协议、连接管理、数据传输等,让
- 立即学习 497次学习
-
- JavaScript正则表达式基础与实战
- 在任何一门编程语言中,正则表达式,都是一项重要的知识,它提供了高效的字符串匹配与捕获机制,可以极大的简化程序设计。
- 立即学习 487次学习
-
- 从零制作响应式网站—Grid布局
- 本系列教程将展示从零制作一个假想的网络科技公司官网,分为导航,轮播,关于我们,成功案例,服务流程,团队介绍,数据部分,公司动态,底部信息等内容区块。网站整体采用CSSGrid布局,支持响应式,有流畅过渡和展现动画。
- 立即学习 484次学习