简体   繁体   English

用ipython Notebook + Pandas绘制线条

[英]Plot lines with ipython notebook + pandas

I have the following CSV: 我有以下CSV文件:

Name,Concurrency,RPS
gunicorn,50,1000
gunicorn,150,1700
paster,50,100
paster,150,300

and I want to plot it so that X is "RPS" and X is "Conccurency" and have a line for each "Name" (gunicorn, paster). 我想绘制它,使X为“ RPS”,X为“ Conccurency”,并为每个“名称”(gunicorn,paste)都有一行。

Would look something like this but with lines: 看起来像这样,但有一行:

P = Paster
G = Gunicorn

200        P              G
100
50    P               G
0
     100     500    1000     2000

Groupby it first and then plot it. 先对它进行分组,然后再绘制。

df.groupby('Name').plot('RPS', 'Concurrency')

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM