title: How to append a list element to each row in a pandas Series?
body: <p>I have the following pandas Series, whereby each row is a long string with no spaces. It is shaped <code>(250,)</code> (i.e. there are 250 rows)</p>
  
  <pre><code>import pandas as pd
  sr1 = pd.Series(...)
  
                                                       0  
  0    abdcadbcadcbadacbadbdddddacbadcbadadbcadbcadad...  
  1    cacacdacadbdcadcabdcbadcbadbdabcabdbbbbbacdbac...  
  2    bbbbbcadcacddabcadbcdabcbaddcbadcbadbcadbcaaba...  
  3    acdbcdacdbadbadcbdbaaaacbdacadbacaddcabdacbdab...  
  ....
  </code></pre>
  
  <p>I have a list of 250 strings which I would like to append to the beginning of each of the rows. </p>
  
  <pre><code>list_of_strings = ["prefix1", "prefix2", "prefix3", ...., "prefix250"]
  </code></pre>
  
  <p>How does one append each element in <code>list_of_strings</code> to the corresponding row in <code>sr1</code>? The resulting Series should look like this:</p>
  
  <pre><code>                                                    0  
  0    prefix1    abdcadbcadcbadacbadbdddddacbadcbadadbcadbcadad...  
  1    prefix2    cacacdacadbdcadcabdcbadcbadbdabcabdbbbbbacdbac...  
  2    prefix3    bbbbbcadcacddabcadbcdabcbaddcbadcbadbcadbcaaba...  
  3    prefix4    acdbcdacdbadbadcbdbaaaacbdacadbacaddcabdacbdab...  
  ....
  </code></pre>
  
  <p>My first thought was to try something like:</p>
  
  <pre><code>sr1.insert(0, "prefixes", value = list_of_strings)
  </code></pre>
  
  <p>But this throws the error <code>AttributeError: 'Series' object has no attribute 'insert'</code>. One could convert <code>sr1</code> to a pandas DataFrame with <code>sr1 = sr1.to_frame()</code>, and the previous <code>.insert()</code> will result in a DataFrame with two columns. </p>
  
  <p>In python, we can concatenate strings with a specified delimiter as follows:</p>
  
  <pre><code>first = "firstword"
  second = "secondword"
  combined = "    ".join([first, second])
  ## outputs 'firstword    secondword'
  </code></pre>
  
  <p>I'm not sure how this is down with a pandas Series. Perhaps <code>.apply('    '.join)</code> somehow?</p>