What's the easiest way to do a case-insensitive string replacement in Pandas?
<p>Is there a way to get a case insensitive regex replace to work on a Pandas dataframe? I would prefer to keep the work vectorised instead of having to resort to creating a loop at the string level to which re.sub is <a href="https://stackoverflow.com/a/919067/5088194">apparently limited</a>.)</p>

<p>(When I try to use re.sub with the dataframe the compiler complains that it needs strings.)</p>

<pre><code>fables['animal_names'] = re.sub(r"(^|\s+|,)hippo(,|\s+|$)"," Hippopotamus ", fables['animal_names'])
</code></pre>

<blockquote>
  <p>TypeError: expected string or bytes-like object</p>
</blockquote>