Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot subset #6970

Closed
Amyunimus opened this issue Apr 25, 2014 · 2 comments · Fixed by #7736
Closed

Cannot subset #6970

Amyunimus opened this issue Apr 25, 2014 · 2 comments · Fixed by #7736
Labels
Milestone

Comments

@Amyunimus
Copy link

from SO: http://stackoverflow.com/q/23301072/564538

I'm trying to print three pandas boxplots next to each other in iPython Notebook.

The dataframes each look basically like this:

sub    cond   accuracy
s1     A      0.814868
s2     A      0.504574
s3     A      0.438314
s4     A      0.956235
s5     A      0.370771
s1     B      0.228724
s2     B      0.691374
s3     B      0.237314
s4     B      0.32633
s5     B      0.859961 

When I plot accuracy without subsetting by condition, this works great:

fig, axes = plt.subplots(nrows=1, ncols=3)
for i, df in enumerate([df1, df2, df3]):
    df.boxplot('accuracy',ax=axes[i])

However, when I try to plot accuracy by condition for each dataframe using instead:

df.boxplot('accuracy',by='cond',ax=axes[i])

only the last plot displays (and not where it should be according to its axes assignment).

This seems to be an issue ing the by=X argument.

@Amyunimus Amyunimus changed the title Cannot subset Cannot subset Apr 25, 2014
@jreback
Copy link
Contributor

jreback commented Apr 25, 2014

This is the issue: http://stackoverflow.com/q/23301072/564538, right?

@Amyunimus
Copy link
Author

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants