Issue
I have a huge data that TextEditors have difficulty to work. For illustration, I am just sharing a simple example given below:
W1 W2 W3
71,65 833,06 54,955
21,63 131,21 32,90
11,56 23,60 87,55
13,21 93,06 14,05
I am trying to replace "," with "." to get output given below:
W1 W2 W3
71.65 833.06 54.955
21.63 131.21 32.90
11.56 23.60 87.55
13.21 93.06 14.05
How can I get this output with python?
Solution
You may try using replace
on the entire data frame:
df = df.replace(',', '.', regex=True)
Answered By - Tim Biegeleisen
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.