I am looking to remove any 2nd decimal from the last of an row if it exists in a column.
Input Data:
column1
27.356.10
25689
2345.00
NaN
123.25.70
12.345.75.00
Expected Output:
column1
27356.10
25689
2345.00
NaN
12325.70
1234575.00
Code Used:
df['column1'] = df['column1'].replace('[^\d.]', '', regex=True).astype(float)
Above script removes special character but how 2nd or 3rd decimal from the last can be Removed if exists