複数のtxtファイルをインポートし、それらを使用してプロットを作成しています。コードは以前と同じですが、今回は機能していないようです。私はそれを基本に戻しましたが、何が問題なのかわかりません。
import numpy
close('all')
data = []
pixels = []
for i in range(0,92):
data.append(genfromtxt('filename_'+str(i+1)+'.txt', usecols=4))
pixels.append(genfromtxt('filename_'+str(i+1)+'.txt', usecols=5))
txt ファイルには複数の値があるため、ループで指定された列のみが必要です。これは以下を返します:
raise ValueError(errmsg)
ValueError: Some errors were detected !
Line #1 (got 2 columns instead of 1)
Line #3 (got 1 columns instead of 1)
Line #5 (got 3 columns instead of 1)
Line #6 (got 3 columns instead of 1)
Line #8 (got 4 columns instead of 1)
Line #10 (got 2 columns instead of 1)
Line #11 (got 2 columns instead of 1)
Line #12 (got 1 columns instead of 1)
Line #35 (got 1 columns instead of 1)
どんな助けでも、素晴らしいでしょう!