histogram pandas xticks code example
Example 1: python plot bins not lining up with axis
# Basic syntax for left-aligned bins:
plt.hist(data, bins=range(number))
# Basic syntax for center-aligned bins:
plt.hist(data, bins=np.arange(number)-0.5)
Example 2: show distribution pandas coloumns
df['age'] == ['14','16','23','54']
df['age'].hist()