How can I get descriptive statistics of a NumPy array?

前端 未结 3 2014
臣服心动
臣服心动 2021-01-01 09:50

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=\"         


        
3条回答
  •  离开以前
    2021-01-01 10:28

    import pandas as pd
    import numpy as np
    
    df_describe = pd.DataFrame(dataset)
    df_describe.describe()
    

    please note that dataset is your np.array to describe.

    import pandas as pd
    import numpy as np
    
    df_describe = pd.DataFrame('your np.array')
    df_describe.describe()
    

提交回复
热议问题