E
E
Elick2022-04-12 11:43:09
numpy
Elick, 2022-04-12 11:43:09

How can Python density histogram values ​​be returned?

Can you tell me how to get an array with the distribution density of the required length from the available sample using python? That is, I have an array of data on hand, I want to get an array of the distribution density of a given length N from it. In fact, as in the construction, But the array should be returned, not the graph
df['sample'].hist(bins=N)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lz961, 2022-04-12
@Elick

convert the column to a numpy array and apply the procedure "numpy.histogram" like this

hist, edges = numpy.histogram(numpy.array(df['sample']), ...)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question