I have one numpy array of the form:
np.Array1 =
[
['2019-12-01' '0.03555' '0.03' '0.03' '0.03'],
['2019-12-02' '0.03' '0.03' '1' '0.03']
]
and a second:
np.Array2 =
[
array(['2019-12-01', '1', '1', '1', '1']),
array(['2019-12-02', '1', '1', '1', '20'])
]
Is there a way for me so do something along the lines of:
Sum each element where npArray1.col1 = npArray2.col1 - i.e : when the dates are the same add element by element (excluding the date)
'2019-12-01' = '2019-12-01' so [0.03555+1, 0.03+1, 0.03+1, 0.03+1]
I get that I am probs going about this the wrong way, by varying the types in the same array
Any advice is appreciated on a better way of add values based on conditional logic.