title: Pandas: Union strings in dataframe
body: <p>I have a dataframe <code>df</code></p>
  
  <pre><code>ID  active_seconds  domain  subdomain   search_engine   search_term
  0120bc30e78ba5582617a9f3d6dfd8ca    35  vk.com  vk.com  None    None
  0120bc30e78ba5582617a9f3d6dfd8ca    54  vk.com  vk.com  None    None
  0120bc30e78ba5582617a9f3d6dfd8ca    34  vk.com  vk.com  None    None
  16c28c057720ab9fbbb5ee53357eadb7    4   facebook.com    facebook.com    None    None
  16c28c057720ab9fbbb5ee53357eadb7    4   facebook.com    facebook.com    None    None
  16c28c057720ab9fbbb5ee53357eadb7    8   facebook.com    facebook.com    None    None
  0120bc30e78ba5582617a9f3d6dfd8ca    16  megarand.ru megarand.ru None    None
  0120bc30e78ba5582617a9f3d6dfd8ca    6   vk.com  vk.com  None    None
  </code></pre>
  
  <p>I need to change <code>df</code>. If to <code>ID</code> <code>subdomain[i] == subdomain[i-1]</code> I should union this string and <code>active_seconds[i-1] + active_seconds[i]</code>. 
  From this df I want to get</p>
  
  <pre><code>ID  active_seconds  domain  subdomain   search_engine   search_term
  0120bc30e78ba5582617a9f3d6dfd8ca    123 vk.com  vk.com  None    None
  16c28c057720ab9fbbb5ee53357eadb7    16  facebook.com    facebook.com    None    None
  0120bc30e78ba5582617a9f3d6dfd8ca    16  megarand.ru megarand.ru None    None
  0120bc30e78ba5582617a9f3d6dfd8ca    6   vk.com  vk.com  None    None
  </code></pre>
  
  <p>What sould I use to do it?</p>