2

Hi I have a pandas dataframe that looks like

deflector  wFlow  aContent  DO Difference
64         3  127.5        10       2.007395
65         3  127.5         3       1.163951
66         3  127.5         5       1.451337
67         3  127.5         7       1.535639
68         3   24.0        10       1.046328
69         3   24.0         3       0.854763
70         3   24.0         5       0.766780
71         3   24.0         7       0.905270
72         3   56.0        10       1.274954
73         3   56.0         3       1.298657
74         3   56.0         5       1.049621
75         3   56.0         7       1.004255
76         3   88.0        10       1.194174
77         3   88.0         3       1.056968
78         3   88.0         5       1.066173
79         3   88.0         7       1.097231

I would like to plot the aContent column vs the DO Difference column with each line defined by the wFlow column (x = aContent, y = DO Difference, 4 different lines, one for each wFlow.

Thanks!

1
  • Welcome to StackOverflow. Please read and follow the posting guidelines in the help documentation. Minimal, complete, verifiable example applies here. We cannot effectively help you until you post your MCVE code and accurately describe the problem. StackOverflow is not a coding or tutorial service. Also, add what you tried? Commented Apr 27, 2017 at 2:11

1 Answer 1

6

You can pivot the data and use pandas.dataframe.plot:

df.pivot(index='aContent',columns='wFlow',values='DO Difference').plot()

enter image description here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.