title: Python- dataframe loop function decrypt
body: <p>I have a dataframe composed of 2 columns 
  Let's say the 2 columns are  idencrypted and num.
  I use a function decrypt that decrypt column idencrypted and takes 2 other arguments (2 keys of encryption).
  I would like to replace the current df or make a new dataframe composed of the id decrypted and the num.
  My decrypt function take only string as an entry , that is why I am using a loop like this, and return a string :
  Decrypt ('idencrypted', key1, iv)</p>
  
  <p>So I would like a df with id and num column, do you know how can I do? 
  Thanks !</p>
  
  <p>Here is my example:<br>
  Here is the function decrypt i am using and that is working:  </p>
  
  <pre><code>for text in ['AAA', 'BBB', 'CCC']:  
      print "original:", text  
      dec = decrypt(text,key,iv)  
      print "decrypted:", dec  
  </code></pre>
  
  <p>Output:  </p>
  
  <pre><code>original: 'AAA'  
  decrypted: user-111  
  original: 'BBB'  
  decrypted: user-222  
  </code></pre>
  
  <p>But now i have a dataframe as an entry and i would like to put the result in a dataframe.<br>
  Example of my dataframe in entry:    </p>
  
  <pre><code>df=getDataFromDB(engine) 
  </code></pre>
  
  <p>The df is composed of 2 columns : idencrypted (like 'AAA','BBB') and  num_col_completed (like '1','2','3')  </p>
  
  <p>What i would like as an output is a dataframe with:<br>
  iddecrypted splited from 'user-' : ('111','222')<br>
  and the num_col_completed : '1','2','3'<br>
  so that i can do joins with this dataframe and others after.  </p>
  
  <p>I know that i can do the split with : <code>.split("-")[1]</code> 
  But i do not succeed decrypt all the dataframe ids to an other dataframe  </p>