Here is my code:
import pandas as p
import numpy as n
import matplotlib.pyplot as m
dataset = p.read_csv('data.csv')
X = dataset.iloc[:, :-1].values
Y = dataset.iloc[:, 3].values
print(dataset)
from sklearn.impute import SimpleImputer
imputer = SimpleImputer(missing_values= 'NaN', strategy= 'mean' )
imputer = imputer.fit(X[: , 1:3])
X[: , 1:3] = imputerr.transform(X[: , 1:3])
Error:
ValueError: Input contains NaN, infinity or a value too large for dtype('float64')