title: Why is Pandas replace() method not working?
body: <p>I am trying to replace all columns in my df with prices to ints however for some reason the replace() method isn't working:</p>
  <pre><code>df = pd.read_csv(f_name, dtype=&quot;string&quot;)
  df = df[df.columns.dropna()]
  df[cols_int] = df[cols_int].replace({&quot;[\$]&quot;: &quot;&quot;, &quot;[,]&quot;: &quot;&quot;}, regex=True)
  df[cols_int] = df[cols_int].astype(int)
  </code></pre>
  <p>Error:</p>
  <pre><code>ValueError: invalid literal for int() with base 10: '$499,000'
  </code></pre>
  <p>I'd appreciate any help!</p>