Hello,
I am currently using the following code to get the intersection date column of two sets of financial data. The arrays include date, o,h,l,cl
#find intersection of date strings
def intersect(seq1, seq2):
res = [] # start empty
for x in seq1: # scan seq1
if x in seq2: # common item?
res.append(x)
return res
x = intersect(seta[:,0], setb[:,0]) # mixed types
print x
The problem is it only returns the column for which it found the intersection of both, namely the date column. I would like it to somehow return a different column array including both the cls values of each set ... ie.. if date is common to both return a 2X1 array of the two corresponding cls columns. Any ideas? thanks.