title: Please Suggest an Efficient way to write this code.. For loops takes long time to process
body: <p>I have to compare <code>df1["col1"]</code> with dictionary <code>key(K)</code>, if <code>df1["col1"]</code> contains the key, then I want the dictionary <code>value(v)</code> in new column in df1.</p>
  
  <p>I wrote the following code, it works but takes a lot of time to complete.<br>
  Note:<br>
  <code>df1["col1"]</code> contains more than 300000 rows and dictionary contains close to 100 key, value pair.</p>
  
  <pre><code>for k, v in prefix_dict.items():
      for i in range(len(jul["col1"])):
          if k in jul["col1"][i]:
              jul["newcol"][i] = v            
  </code></pre>
  
  <p>I am looking for an alternate way</p>