title: replace string of symbol+ rational number python
body: <p>I have a large corpus which contains sentences such as</p>
  <pre><code>text = [&quot;$3.4 million but not section 4.1&quot;]
  </code></pre>
  <p>that I want to clean as</p>
  <pre><code>text = [&quot;$3,4 million but not section 4.1&quot;]
  </code></pre>
  <p>using a simple line such as</p>
  <p><code>text.replace(&quot;$\d.\d&quot;,&quot;$\d,\d&quot;)</code> or with <code>re.sub</code>.
  but I don't know how to map the string <em>&quot;$&quot;+digit+&quot;.&quot;</em> to <em>&quot;$&quot;+digit+&quot;,&quot;</em></p>
  <p>Any idea?
  thanks</p>