May-08-2019, 07:55 AM
Hi all,
I have a large array (+1M values) where for each value I want to lookup something in a table.
What would be an efficient way to do this?
for instance,a s a small example:
Thanks,
I have a large array (+1M values) where for each value I want to lookup something in a table.
What would be an efficient way to do this?
for instance,a s a small example:
A = pd.DataFrame([67,67,67,67,68,69,69,69,70,70]) Table = pd.DataFrame(np.array([[67,'a'],[68,'b'],[69,'c'],[70,'d']]),columns=['Index', 'Item']) Result = ['a','a','a','a','b','c','c','c','d','d']How do I best get to the desired result, especially when A is very large?
Thanks,