0

制作时没有问题new_df。但是当我尝试运行它时,我收到以下错误(见图):

from pycaret.classification import *

pycaret_models = {}
years = ['2017', '2018', '2019', '2020']
for year in years:
    a = train_data[year]['X'].reset_index(drop=True)
    b = train_data[year]['y'].reset_index(drop=True)
    new_df = pd.concat([a,b],axis=1)
    setup_clf = setup(data=new_df, target='knowcode',use_gpu = True)
    top5 = compare_models(sort='F1', n_select=5)
    pycaret_models[year] = top5

在此处输入图像描述

在此处输入图像描述

4

0 回答 0