I have data stored in a pandas DataFrame that I move to a numpy array using the following code
# used to be train_X = np.array(train_df.iloc[1:,3:].values.tolist())
# but was split for me to find he source of change
pylist = train_df.iloc[1:,3:].values.tolist()
print(pylist[0])
train_X = np.array(pylist)
print(train_X[0])
the first print returns :
[0.0, 0.0, 0.0, 0.0, 1.0, 504.0, 0.0, 2.0, 8.0, 0.0, 0.0, 0.0, 0.0, 2.0, 8.0, 0.0, 189.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 85143.0, 57219.0, 62511.267857142804, 2649.26669430866]
the second print after the I move it to a Numpy array returns this
[0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00
1.00000000e+00 5.04000000e+02 0.00000000e+00 2.00000000e+00
8.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00
0.00000000e+00 2.00000000e+00 8.00000000e+00 0.00000000e+00
1.89000000e+02 0.00000000e+00 0.00000000e+00 0.00000000e+00
0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00
0.00000000e+00 0.00000000e+00 8.51430000e+04 5.72190000e+04
6.25112679e+04 2.64926669e+03]
why does this happen ? and how do I stop it