title: Match array of strings to 2D array
body: <p>I have a <code>1D</code> array of strings (<code>gene_name_list</code>). I need to find rows in another <code>2D</code> array (<code>fully_split</code>) where each string of the first array is present. Of course I can solve it brute force like that:</p>
  
  <pre><code>longest_gene_name = len(max(gene_name_list, key=len))
  ensembl_list = np.full((len(gene_name_list)), '', dtype='U{}'.format(longest_gene_name))
  for idx, gene_name in enumerate(gene_name_list):  
      for row in fully_split:                       
          if gene_name in row:                      
              ensembl_list[idx] = row[0]
  </code></pre>
  
  <p>But it takes too long, I need a faster solution. </p>
  
  <p><code>row[0]</code> contains special symbols that I am mapping to. So, if a string is found, it will be found in <code>row[1:]</code> portion, and then I am taking <code>row[0]</code>. Not relevant, but to clarify.</p>