title: How to display a different column value of a dataframe in a seaborn barplot over the bars conditionally?
body: <p>I have a dataframe <code>sales</code> with columns [<code>book_name</code>, <code>num_orders</code>, <code>condition</code>,<code>price</code>].</p>
  
  <p><code>condition</code> has 4 variants. For each <code>book_name</code>, I only try to plot bars for those conditions which have <code>num_orders</code>>=10.</p>
  
  <p>So, I do:</p>
  
  <p><code>sns.barplot(x='book_name', y='price', hue='condition', data=sales[sales.num_orders&gt;=10])</code></p>
  
  <p>Now, I want to display <code>num_orders</code> for each condition of each <code>book_name</code> over its corresponding bar. If it is not plotted because of the threshold 10, then skip it.</p>
  
  <p>How can I achieve this?</p>
  
  <p>Example Dataframe:</p>
  
  <pre><code>import pandas as pd
  sales = pd.DataFrame.from_dict({"book_name":["Island", "Island", "Island","Island", "Cinder","Cinder", "Cinder","Cinder","Speak","Speak","Speak","Speak"],
                                  "num_orders" : [15, 17, 3,40,57,120,5,65,34,6,7,8], 
                                  "condition":["New", "Old", "Rough","Torn","New", "Old", "Rough","Torn","New", "Old", "Rough","Torn"],
                                 "price":[700,600,500,400,1000,900,800,700,1500,1400,1300,1200]})
  </code></pre>
  
  <p>When I run:</p>
  
  <pre><code>sns.barplot(x='book_name',y='price',data=sales,hue='condition')
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/mZYNf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/mZYNf.png" alt="enter image description here"></a>
  And, when I do the following:</p>
  
  <pre><code>sns.barplot(x='book_name',y='price',data=sales[sales.num_orders&gt;10],hue='condition')
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/0O03C.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/0O03C.png" alt="enter image description here"></a></p>
  
  <p>I want to display the value of num_orders on top of bars plotted. If there is no bar, no value. Suggestions to use different libraries are welcome but please post the solution as well to this specific problem where I am using hue and want to display values of some other column above those bars.</p>