I am working with a dataset; below you can see a small example.
import pandas as pd
import numpy as np
data = {
'id':['9.','09', 9],
}
df = pd.DataFrame(data, columns = [
'id',])
df['id'] = df['id'].replace(".","")
df
In this data set, one number is written in three ways e.g '9.','09', 9
Now I want to have all of these numbers written in the same way e.g 9, without . or 0
I tried with this line of code but it is not working
df['id'] = df['id'].replace(".","")
So can anybody help me how to solve this problem?