py3_run 오류가 납니다(코드 첨부)
import pandas as pd pd.set_option('display.max_columns',None) train = pd.read_csv("data/customer_train.csv") test = pd.read_csv("data/customer_test.csv") train['환불금액'] = train['환불금액'].fillna(0) test['환불금액'] = test['환불금액'].fillna(0) #cols=['주구매상품','주구매지점']#0.6117 cols=['회원ID','총구매액','최대구매액','환불금액','방문일수','방문당구매건수','주말방문비율','구매주기'] target=train.pop('성별') #from sklearn.preprocessing import LabelEncoder #le=LabelEncoder() #for col in cols: # train[col]=le.fit_transform(train[col]) # test[col]=le.transform(test[col]) from sklearn.model_selection import train_test_split x_tr,x_val,y_tr,y_val=train_test_split(train, target, test_size=0.2, random_state=0) from sklearn.ensemble import RandomForestClassifier model=RandomForestClassifier() model.fit(x_tr,y_tr) pred=model.predict_proba(x_val) #print(pred) from sklearn.metrics import roc_auc_score print(roc_auc_score(y_val, pred[:,1])) pred = model.predict_proba(test) submit = pd.DataFrame({ 'pred': pred[:,1] }) submit.to_csv('result.csv', index=False) print(pd.read_csv('result.csv'))