title: How to use hist() in python?
body: <p>I read the data into a DataFrame and called it data. I have the following query in python:</p>
  
  <pre><code>new_data=data[data["gender"]=="male"].groupby('age').city.nunique().sort_values(ascending=False)
  </code></pre>
  
  <p>now I want to create its histogram using</p>
  
  <p><code>new_data.hist()</code> </p>
  
  <p>which would be something like following:</p>
  
  <p><a href="https://i.stack.imgur.com/4Z70V.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4Z70V.jpg" alt="enter image description here"></a></p>
  
  <p>I want to do 2 things:</p>
  
  <ol>
  <li><p>I want to show the <code>bin</code> ranges, for example for the first bin I want to see something like 20 and 28 (I'm guessing from the picture)</p></li>
  <li><p>I want to add labels to the Axes. so I want on x-axis show age, and y-axis number of ages.</p></li>
  </ol>
  
  <p>another question: how can I tell hist I want the bins to be in some specific ranges? lets say I want the first bin to be between 20 and 25 , the second from 25 to 35 and so on.</p>