0
CSVファイルから値を読み取ろうとしていますが、エラーが発生しています。Python。 NumPyファイルI/O。並べ替え配列
は、ここでは、コードスニペットです:
import numpy as np
file_read=np.loadtxt('stock_px.csv', delimiter=',')
print ("Restored data: \n" + str(file_read))
ここでエラーメッセージです:
ValueError: could not convert string to float:
「stock_px.csv」の内容は何ですか? –
[numpy.loadtxt、ValueError:stringをfloatに変換できませんでした]の重複の可能性があります(http://stackoverflow.com/questions/16729210/numpy-loadtxt-valueerror-could-not-convert-string-to-float) –