import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
cigdata = pd.read_csv ('cigs.csv')
print(cigdata.head())
cigdata.shape
#Changing pandas dataframe to numpy array
X = cigdata.iloc[:,:8].values
y = cigdata.iloc[:,8:9].values
#Normalizing the data
from sklearn.preprocessing import StandardScaler
sc = StandardScaler()
X = sc.fit_transform(X)
I am trying to normalize my data for implementation of naïve Bayes algorithm but it is not working as I have string values in my dataset and it's showing something like this:
valuetype error string value cannot be converted to float.