Reputation:
I have some .txt file which is saved from Matlab. I want to load them in Jupiter. But, when I've used the
np.loadtxt(r'C:...\data.txt')
It gives me the following error:
ValueError: could not convert string to float: '-1.3223e-24,-34.367,36.531,40.284,41.264
Can you help me to solve this? thank you
Upvotes: 2
Views: 54
Reputation: 1122
You need to add delimiter
parameter:
np.loadtxt(r'C:...\data.txt', delimiter=",")
Upvotes: 1