title: Python: How to split and re-join first and last item in series of strings
body: <p>I have a Series of strings, the series looks like;</p>
  
  <pre><code>Series
  "1, 2, 6, 7, 6"
  "1, 3, 7, 9, 9"
  "1, 1, 3, 5, 6"
  "1, 2, 7, 7, 8"
  "1, 4, 6, 8, 9"
  "1"
  </code></pre>
  
  <p>I want to remove all elements apart from the first and last, so the output would look like;</p>
  
  <pre><code>Series
  "1, 6"
  "1, 9"
  "1, 6"
  "1, 8"
  "1, 9"
  "1"
  </code></pre>
  
  <p>To use Split(), do I need to loop over each element in the series? I've tried this but can't get the output I'm looking for.</p>