TypeError: 不能从 [datetime64[ns, UTC]] 到 [int32] 键入 datetimelike
import numpy as np
import pandas as pd
import seaborn as sns
from sklearn.ensemble import IsolationForest
data = pd.read_csv("data.csv", parse_dates=['timestamp'])
data['timestamp'] = data['timestamp'].astype('int')
model=IsolationForest(n_estimators=50, max_samples='auto', contamination=float(0.1),max_features=1.0)
model.fit(data[['timestamp','a','b','c','d','e','f','g', 'h','i','j','k']])
data['scores']=model.decision_function(data[['timestamp','a','b','c','d','e','f','g', 'h','i','j','k']])
data['anomaly']=model.predict(data[['timestamp','a','b','c','d','e','f','g', 'h','i','j','k']])
桌子是空的