【问题标题】:Kaggle file sumbission error (Santander Value Prediction Challenge)Kaggle 文件汇总错误(Santander Value Prediction Challenge)
【发布时间】:2018-12-06 03:56:32
【问题描述】:

收到提交错误:

ERROR: The value '7.63E+15' in the key column 'ID' has already been defined (Line 23029, Column 1).

挑战链接:https://www.kaggle.com/c/santander-value-prediction-challenge

提交文件的头部:

          ID         target
0      000137c73  5.944923e+06
1      00021489f  5.944923e+06
2      0004d7953  5.944923e+06
3      00056a333  5.944923e+06
4      00056d8eb  5.944923e+06

【问题讨论】:

  • 您好,如果我的解决方案对您有帮助,请接受。它可以帮助社区。​​span>

标签: pandas csv dataframe error-handling kaggle


【解决方案1】:

我猜你使用过 excel 或 LibreOffice Calc。在 excel 中打开文件以查看输出将折叠您的格式。通常最好的办法是完全避免使用 Excel。你在使用 Python 吗?最简单的做法是加载示例提交,替换目标列,然后保存:

ss = pd.read_csv('sample_submission.csv')
ss.loc[:, 'target'] = preds

ss.to_csv('sub.csv',
      index=False)

【讨论】:

    猜你喜欢
    • 2018-11-23
    • 1970-01-01
    • 1970-01-01
    • 2020-08-15
    • 1970-01-01
    • 1970-01-01
    • 2012-10-31
    • 1970-01-01
    • 2021-04-06
    相关资源
    最近更新 更多