import pandas as pd
import numpy as np
import sklearn
from sklearn import preprocessing, neighbors, svm
from sklearn.model_selection import train_test_split
import matplotlib.pyplot as plt
df = pd.read_csv(r'C:\Users\Home\Desktop\result-messidor.csv')
df.replace('?', -99999, inplace=True)
df.dropna(['id'], 1, inplace=True)
x = np.array(df.dropna(['class'], 1, axis=1))
y = np.array(df['class'])
x_train, x_test, y_train, y_test = sklearn.model_selection.train_test_split(x, y, test_size=0.2)
clf = svm.SVC(kernel='linear')
clf.fit(x_train, y_train)
acc = clf.score(x_test, y_test)
print(acc)
Я пытаюсь определить точность, используя алгоритм SVM, но у меня есть эта ошибка
Traceback (most recent call last):
File "C:/Users/Home/PycharmProjects/rrrr/Arwa1.py", line 10, in <module>
df.dropna(['id'], 1, inplace=True)
File "C:\Users\Home\Desktop\enviroment\lib\site-packages\pandas\core\frame.py", line 4734, in dropna
raise TypeError("supplying multiple axes to axis is no longer supported.")
TypeError: supplying multiple axes to axis is no longer supported.
Как я могу это исправить?