I have a file that looks like this:
row column layer value1 value2
8 454 1 0.000e+0 1.002e+4
8 455 1 0.000e+0 1.001e+4
8 456 1 0.000e+0 1.016e+4
8 457 1 0.000e+0 1.016e+4
.
.
.
I want to do some calculations on the last column (for example multiply by 10) and save it (in-place or as a new file) without changing the format. I know how to load it but I don't know how to continue. I do the following to load the data:
import numpy as np
ic = np.genfromtxt("file.dat",skip_header=1, usecols=(0,1,2,4),
dtype=None, names = ['row', 'column', 'layer', 'value2'])
the file is abound 150M, so fast execution would be helpful.