Hi Zindi,
I am getting error in making a submission: "Missing entries for IDs 26024, 64909, 91864, 113423, 76043 and more".
Meanwhile after manually checking the csv file I am submitting I have the IDs 26024, 64909, 91864, 113423, 76043 in there. What is the issue, please?
Hi Zindi, Same error even I was getting .. Kindly check into it and confirm. Thanks !
Make sure the IDs are integer (26024.0 should be 26024), it should not complain after this.
import pandas as pd df = pd.read_csv("submission_9.csv") df2 = pd.read_csv("ref_south_africa_crops_competition_v1_test_labels/_common/sample_submission.csv") df.index = df["Field ID"] df2.index = df2["Field ID"] print(df.head()) df.columns = [i for i in range(len(df.columns))] df = df[[0, 8, 3, 1, 2, 9, 6, 5, 7, 4]] print(df.index, df2.index) print(df.index.shape, df2.index.shape) print(set(df.index) - set(df2.index)) df = df.reindex(df2.index) df = df.iloc[:, 1:] df.to_csv("sample_reorganised_9.csv", index=True)
I fix this error like this. You need to reindex your df to be in the same order as their sample submission. In this example my columns start with field_id and then are in the original label order
Thanks a lot .. I will use this and hopefully don't get an error.
I got this error before, I was doing prediction on the training data instead of the test data.