I am looking for the correct way to change the comma decimal separator to the dot decimal separator.
How can you change the decimal separator from comma ,
to dot .
with Python Pandas?
import pandas as pd
df = pd.read_csv("some.csv", quotechar='"', decimal=",")
decmark_reg = re.compile('(?<=\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='"')
[Apparently a solution] to change the ,
decimals to the .
decimals
import pandas as pd
df = pd.read_csv("some.csv", quotechar='"', decimal=",")
df.to_csv(fileName, sep=',', encoding='utf-8', quotechar='"', decimal='.')