Hi There I am new to machine learning
I have collected some data from some pcap: The sample is like below
Byte Count ByteAvg isMalware
[74, 74, 74, ...] 3570 188.298880 0
[66, 69, 90, ...] 915 157.691803 0
.....
[103, 103, 76 ...] 1075 127.526512 1
[66, 69, 90, ...] 6877 140.671805 1
And I try the sample code of svm
df = pd.read_csv("traffic.csv")
# split data and class
X = df.drop('isMalware', axis=1)
y = df['isMalware']
# Spilt train and test data
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size = 0.20)
# Training
svclassifier = SVC(kernel='linear')
svclassifier.fit(X_train, y_train)
y_pred = svclassifier.predict(X_test)
print(confusion_matrix(y_test,y_pred))
print(classification_report(y_test,y_pred))
However the error is raised
ValueError: could not convert string to float: '[74, 74, 74, 66, 66, 66, 280
How can I change the CSV format and in order to put it into the SVM classifier?