My data — an array of 196,555 records extracted from the pandas data frame — is put into one matplotlib.hist bit. The data was originally integers, so I tried converting it to a float, as shown below, but it still does not spread among 10 boxes.
Interestingly, a small sub-sample (using df.sample (0.00x)) of integer data was successfully distributed.
Any suggestions on where I might be wrong when preparing data or using the matplotlib histogram function will be appreciated.

x = df[(df['UNIT']=='X')].OPP_VALUE.values
num_bins = 10
n, bins, patches = plt.hist((x[(x>0)]).astype(float), num_bins, normed=False, facecolor='0.5', alpha=0.8)
plt.show()
source
share