def get_table(train_table):
x_cols = []
for col in train_table.columns:
# print(data[col].value_counts())
if col not in ['result', 'team_name', 'competition', 'season_x',
'surname']:
train_table[col] = train_table[col].astype(str)
x_cols.append(col)
# print(x_cols)
X = pd.get_dummies(train_table[x_cols])
y = train_table['result']
print(train_table.shape)
print(X.shape)
print(y.shape)
return X, y
评论列表
文章目录