0
'car3.csv' file download linkなぜpythonのnumpy std()は不要なスペースを作るのですか?
import csv
num = open('car3.csv')
nums = csv.reader(num)
nums_list = []
for i in nums:
nums_list.append(i)
import numpy as np
nums_arr = np.array(nums_list, dtype = np.float32)
print(nums_arr)
print(np.std(nums_arr, axis=0))
結果がこれです。
[[ 1. 1. 2.]
[ 1. 1. 2.]
[ 1. 1. 2.]
...,
[ 0. 0. 5.]
[ 0. 0. 5.]
[ 0. 0. 5.]]
[ 0.5 0.5 1.11803401]
私は期待していないスペースがたくさんあります。 どうすればこれらを処理できますか?
https://stackoverflow.com/questions/2891790/? – Divakar