'Convert comma to dot in pd series [duplicate]

What is the proper way to replace dots to strings as the code below?

s = pd.Series(['1,1', '2,2', '3,3', '4,4', '5,5'])

Also, why this code below does not work?

s.replace({',':'.'})


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source