Sorry, I am new in Data science. so I have dataset like this (full code below)
and then I want to fill the missing data
as you can see, there is a lot zeros (44.0000000), can I make it just (44.0) ?
category = ["Age","Salary"]
imputer_strategy = SimpleImputer(strategy="mean")
imputer = ColumnTransformer([
("cat",imputer_strategy,category)
])
X.iloc[:,1:] = imputer.fit_transform(X.iloc[:,1:])
X
You can add this line in your code to get the format you need:
pd.options.display.float_format = '{:,.1f}'.format