I'm trying to read just the value after the decimal point of a parameter calculated in my python script for a whole data set. I've read up on using math.modf, and I understand how it should work but I'm unsure how to apply that to my dataset as a whole. Ultimately I'm trying to plot a scatter graph with the values calculated.
I only need the number after the decimal point from the equation where x is the imported dataset
p = (x[:,0]-y)/z
I understand math.modf gives a result (fractional, integer)
so I tried adding [0]
at the end but I think that interferes when I'm trying to read certain lines from the dataset.
Sorry if this is really basic I'm new to python, thanks in advance.
This is how I've inputted it so far
norm1 = np.loadtxt("dataset")
y = (numerical value)
z = (numerical value)
p = (norm1[:,0] - y)/z
decp = math.modf(p)
plt.scatter(decp, norm1[:,2])