Pandas Kaggle文件求和错误(桑坦德值预测挑战)
获取提交错误:Pandas Kaggle文件求和错误(桑坦德值预测挑战),pandas,csv,dataframe,error-handling,kaggle,Pandas,Csv,Dataframe,Error Handling,Kaggle,获取提交错误: ERROR: The value '7.63E+15' in the key column 'ID' has already been defined (Line 23029, Column 1). 挑战的链接: 提交文件的标题: ID target 0 000137c73 5.944923e+06 1 00021489f 5.944923e+06 2 0004d7953 5.944923e+06 3
ERROR: The value '7.63E+15' in the key column 'ID' has already been defined (Line 23029, Column 1).
挑战的链接:
提交文件的标题:
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
我猜您使用了excel或LibreOffice Calc。在excel中打开文件以查看输出将折叠您的格式。一般来说,最好的做法是完全避免使用Excel。你在使用Python吗?最简单的方法是加载示例提交,替换目标列,然后保存:
ss = pd.read_csv('sample_submission.csv')
ss.loc[:, 'target'] = preds
ss.to_csv('sub.csv',
index=False)
您好,如果我的解决方案对您有帮助,请接受。它有助于社区。