sontek
sontek

Reputation: 12451

Plot lines with ipython notebook + pandas

I have the following 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).

Would look something like this but with lines:

P = Paster
G = Gunicorn

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

Upvotes: 0

Views: 103

Answers (1)

waitingkuo
waitingkuo

Reputation: 93924

Groupby it first and then plot it.

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

enter image description here

Upvotes: 3

Related Questions