title: Why does DataFrameGroupBy.boxplot method throw error when given argument "subplots=True/False"?
body: <p>I can use DataFrameGroupBy.boxplot(...) to create a boxplot in the following way:</p>
  
  <pre><code>In [15]: df = pd.DataFrame({"gene_length":[100,100,100,200,200,200,300,300,300],
  ...:                        "gene_id":[1,1,1,2,2,2,3,3,3],
  ...:                        "density":[0.4,1.1,1.2,1.9,2.0,2.5,2.2,3.0,3.3],
  ...:                        "cohort":["USA","EUR","FIJ","USA","EUR","FIJ","USA","EUR","FIJ"]})
  </code></pre>
  
  <p><code>In [17]: df.groupby("cohort").boxplot(column="density",by="gene_id")</code></p>
  
  <p><code>In [18]: plt.show()</code></p>
  
  <p>This produces the following image:
  <a href="https://i.stack.imgur.com/y1o0w.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y1o0w.png" alt="enter image description here"></a></p>
  
  <p>This is exactly what I want, except instead of making three subplots, I want all the plots to be in one plot (with different colors for USA, EUR, and FIJ). I've tried</p>
  
  <p><code>In [17]: df.groupby("cohort").boxplot(column="density",subplots=False,by="gene_id")</code></p>
  
  <p>but it produces the error</p>
  
  <p><code>KeyError: 'gene_id'</code></p>
  
  <p>I think the problem has something to do with the fact that <code>by="gene_id"</code> is a keyword sent to the matplotlib boxplot method. If someone has a better way of producing the plot I am after, perhaps by using DataFrame.boxplot(?) instead, please respond here. Thanks so much!</p>