0

I have the following dataframe, which has a multiindex. I thought I could groupby run then create a boxplot to show the variance between the different runs, but that doesn't seem to work.

             beta
n   run 
n1  run1    -2.301871e-05
    run2     2.45619e-05
    run3     3.413542e-05
    run4     5.23709e-06
    run5     2.313496e-05
n2  run1     -2.96116e-06
    run2    -4.626588e-06
    run3    -4.463705e-06
    run4    -5.827251e-06
    run5    -3.127893e-06
n3  run1    -3.196585e-06
    run2    -3.020926e-06
    run3    -2.264738e-06
    run4    -6.599127e-07
    run5    -3.301398e-06
n4  run1    -3.509957e-07
    run2     -4.88517e-07
    run3     2.51758e-05
    run4     1.097775e-05
    run5    -9.213195e-07
n5  run1    -5.393409e-07
    run2    -1.147589e-06
    run3     -1.07985e-06
    run4     8.075297e-06
    run5     4.471477e-06

how do I create a boxplot from it?

1 Answer 1

3

Are you looking for something like this?

>>> df.reset_index().boxplot('beta', by='run')

beta values by run

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.