dbplot允许您在数据库中计算绘图
dbplot的Python项目详细描述
dbplot
dbplot允许您对数据库中的绘图进行计算。
dbplot由ibis提供支持,因此它可以针对多个数据库,这些数据库包括: postgres、mysql、apache impala、apache kudu、bigqueryand more,以及ibis将支持的所有内容 在未来,比如apache spark。
安装
pip install dbplot
开发版本:
pip install git+git://github.com/danielfrg/dbplot.git
用法
有关示例,请参见notebooks。
importosimportibisimportdbplot# Connect to DBhost=os.environ.get("DBPLOT_TEST_POSTGRES_HOST","localhost")user=os.environ.get("DBPLOT_TEST_POSTGRES_USER","postgres")password=os.environ.get("DBPLOT_TEST_POSTGRES_PASSWORD")database=os.environ.get("DBPLOT_TEST_POSTGRES_DATABASE","nycflights13")con=ibis.postgres.connect(host=host,database=database,user=user,password=password)# Get a tableflights=con.table("flights")# Plot stuffdbplot.hist(flights,flights.dep_time,nbins=20)
路线图
- 自动测试
- 更多绘图,如光栅图、折线图等:)
注释
基于dbplot for R。