title: Python Histogram ValueError: range parameter must be finite
body: <p>when plotting Pandas dataframe using a histogram, </p>
  
  <p>sample dataframe data</p>
  
  <pre><code>     distance
  0    5.680195
  2    0.000000
  3    7.974658
  4    2.461387
  5    9.703089
  </code></pre>
  
  <p>code I use to plot</p>
  
  <pre><code>import matplotlib.pyplot as plt
  
  plt.hist(df['distance'].values)
  plt.show()
  </code></pre>
  
  <p>I have this error</p>
  
  <pre><code>"ValueError: range parameter must be finite."  
  </code></pre>
  
  <p>my attempt </p>
  
  <pre><code>df['Round_Distance'] = df['distance'].round(1)
  
  0    5.7
  2    0.0
  3    8.0
  4    2.5
  5    9.7
  </code></pre>
  
  <p>plot again, new error</p>
  
  <pre><code>plt.hist(df['Round_Distance'].values)
  plt.show()
  
  ValueError: max must be larger than min in range parameter.
  </code></pre>
  
  <p>weird thing is, the work around i use is below, i don't have to ROUND</p>
  
  <pre><code>df['distance'].hist(bins=[0,25,50,75,100,125,150,175], color='g')
  </code></pre>