title: Replace elements of a pandas series with a list containing a single string
body: <p>I am trying to replace the empty list in a pandas serie with a list containing a single string. Here is what I have:</p>
  <pre class="lang-py prettyprint-override"><code>a = pd.Series([ 
      [],
      [],
      ['a'],
      ['a'],
      [&quot;a&quot;,&quot;b&quot;]
  ])
  </code></pre>
  <p>The desired output is as following :</p>
  <pre><code>b = pd.Series([ 
      ['INCOMPLETE'],
      ['INCOMPLETE'],
      ['1'],
      ['1'],
      [&quot;1&quot;,&quot;2&quot;]
  ])
  </code></pre>
  <p>Where I try to replace the empty lists using boolean indexing, I get an automatic coercion of my list of a unique string to just string string:</p>
  <pre><code>a[a.map(len) == 0 ] = ['INCOMPLETE']
  </code></pre>
  <pre><code>0    INCOMPLETE
  1    INCOMPLETE
  2           [a]
  3           [a]
  4        [a, b]
  </code></pre>
  <p>In contrast the manual replacement works <code>a[0] = ['INCOMPLETE']</code></p>
  <p>Does anyone have a workaround?</p>