I have a massive text file, a dummy version looks like this after skipping headers:
1444455 7 8 12 52 45 68 70
1356799 3 3 45 34 23 22 11
I would like to read this into a numpy array and np.loadtxt is working really slow. The name of the file is data.txt. Right now I am using:
u=pd.read_csv('data.txt',dtype=np.float16,header=3).values
I have played with the parameters to no avail. If I leave out the dtype I get a single long string of numbers for each row in my array. When I insert the dtype I get the error: invalid literal for float(). I believe there is also some confusion about the two types of separators I have in the text file (tabs and single spaces). How can I get this into a numpy array of shape (2,8).
Could any of you pros help? Thanks