I use the following code to create a numpy-ndarray. The file has 9 columns. I explicitly type each column:
dataset = np.genfromtxt("data.csv", delimiter=",",dtype=('|S1', float, float,float,float,float,float,float,int))
Now I would like to get some descriptive statistics for each column (min, max, stdev, mean, median, etc.). Shouldn't there be an easy way to do this?
I tried this:
from scipy import stats
stats.describe(dataset)
but this returns an error: TypeError: cannot perform reduce with flexible type
How can I get descriptive statistics of the created NumPy array?
question from:
https://stackoverflow.com/questions/38583738/how-can-i-get-descriptive-statistics-of-a-numpy-array 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…