Created
June 27, 2020 17:17
-
-
Save 95Rajitha/708c8b8ad6b013bee11386850c320c30 to your computer and use it in GitHub Desktop.
this is all about the data preprocessing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as pit | |
import pandas as pd | |
dataSet = pd.read_csv('SampleData.csv') | |
x = dataSet.iloc[:,:-1].values | |
y = dataSet.iloc[:,-1].values | |
print(x) | |
print(y) | |
imputer = SimpleImputer(missing_values=np.nan,strategy='mean') | |
imputer.fit(x[:,1:3]) | |
x[:,1:3]=imputer.transform(x[:,1:3]) | |
from sklearn.impute import SimpleImputer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment