There is a method to plot Series histograms, but is there a function to retrieve the histogram counts to do further calculations on top of it?
I ke
If you know the number of bins you want, you can use pandas' cut function, which is now accessible via value_counts. Using the same random example:
s = pd.Series(np.random.randn(100))
s.value_counts(bins=5)
Out[55]:
(-0.512, 0.311] 40
(0.311, 1.133] 25
(-1.335, -0.512] 14
(1.133, 1.956] 13
(-2.161, -1.335] 8