xg_model.py 文件源码

python
阅读 30 收藏 0 点赞 0 评论 0

项目:expected_goals 作者: andrebrener 项目源码 文件源码
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
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号