title: Python Pandas Series if else box plot
body: <p>I have alot of data in a dictionary format and I am attempting to use pandas print a string based on an IF ELSE statement. For my example ill make up some data in dict and covert to Pandas:</p>
  
  <pre><code>df = pd.DataFrame(dict(a=[1.5,2.8,9.3],b=[7.2,3.3,4.9],c=[13.1,4.9,15.9],d=[1.1,1.9,2.9]))
  
  df
  </code></pre>
  
  <p>This returns:</p>
  
  <pre><code>    a   b   c   d
  0   1.5 7.2 13.1 1.1
  1   2.8 3.3 4.9 1.9
  2   9.3 4.9 15.9 2.9
  </code></pre>
  
  <p>My IF ELSE statement:</p>
  
  <pre><code>for col in df.columns:
      if (df[col] &lt; 4).any():
          print('Zone %s does not make setpoint' % col)
      else:
          print('Zone %s is Normal' % col)
  </code></pre>
  
  <p>Returns:</p>
  
  <pre><code>Zone a does not make setpoint
  Zone b does not make setpoint
  Zone c is Normal
  Zone d does not make setpoint
  </code></pre>
  
  <p>But now I want to add in an extra to create a box plot where I am not making setpoint and also average the data frame where it is making setpoint. I know this is pandas series, but can <code>pandas.Series.plot.box()</code> be used?</p>
  
  <p>This is my IF ELSE statement that I am using in a function with <code>df.apply(lamba x:)</code> and I am stuck trying to get the box box plot to work in pandas series... Any advice is greatly appreciated!</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  def _print(x):
      if (x &lt; 4).any():
          print('Zone %s does not make setpoint' % x.name)
          df.boxplot()
          plt.show()
      else:
          print('Zone %s is Normal' % x.name)
          print('The average is %s' % x.mean())
  </code></pre>
  
  <p>Im getting an error when I am calling <code>df.apply(lambda x: _print(x))</code></p>
  
  <blockquote>
    <p><code>module 'matplotlib' has no attribute 'show'</code></p>
  </blockquote>