title: Python Pandas: correct way to change comma decimal to dot decimal in Pandas Dataframe?
body: <p>I am looking for the correct way to change the comma decimal separator to the dot decimal separator. </p>
  
  <p><strong>How can you change the decimal separator from comma <code>,</code> to dot <code>.</code> with Python Pandas?</strong></p>
  
  <pre><code>import pandas as pd
  
  df = pd.read_csv("some.csv", quotechar='"', decimal=",")
  decmark_reg = re.compile('(?&lt;=\d),(?=\d)')          #replace all commas with dots
  decmark_reg.sub('.', result) # IS THIS CORRECT WAY TO CHANGE DECIMAL Separator?
  ...
  result.to_csv(fileName, sep=',', encoding='utf-8', quotechar='"')
  </code></pre>
  
  <p><strong>[Apparently a solution]</strong> to change the <code>,</code> decimals to the <code>.</code> decimals</p>
  
  <pre><code>import pandas as pd
  
  df = pd.read_csv("some.csv", quotechar='"', decimal=",")
  df.to_csv(fileName, sep=',', encoding='utf-8', quotechar='"', decimal='.')
  </code></pre>