My code looks like this at the moment:
new_table = np.zeros(shape=(4,1),dtype=object)
for i in y:
some calculation that produce result
new_table = np.append(new_table, np.array([result]), axis=0)
After printing new_table result look like this:
array([[0],
[0],
[0],
[0],
[(1, 61.087293, 33.429379, 0.42581059018640416)],
[(1, 61.087293, 33.429379, 0.3203261022508016)],
[(1, 61.087293, 33.429379, 0.45689267865065536)]], dtype=object)
But output should be without those 4 zeros at the beginning of the array:
I am not sure what I am doing wrong, and is there possibility to add the column names to new_table and how to do this?
Thanks.
some calculation that produce resultis responsible for this, but you didn't show it...new_tableis a 4 by 1 matrix of zeros, so you created the zeros innew_table = np.zeros(shape=(4,1),dtype=object)