Data ·14 Oct 2018, 09:43· edited less than a minute later·5
Hi all. I've been trying to make submissions but am always getting an error that some entries are missing from the predicted set. What could be the problem?
Maybe a csv file misses something? Maybe headers, or not enough rows. You can have a look at my repo https://github.com/pawelmorawiecki/traffic_jam_Nairobi and try to run the code. It generates the csv file with predictions and then compare the file with yours.
Whenever I get that error, it turns out my csv file has 3 columns. This happens because I am using pandas to output results, and the .to_csv() method returns a .csv file with the index as one of the columns. If this is your problem, you can adjust this within your code or manually fix the .csv file.
Hi. First of all try to print the head() or columns() before saving it into a file to confirm the output of the predictions which should be ride_id and number_of_ticket.
@kibuikaCodes
Maybe a csv file misses something? Maybe headers, or not enough rows. You can have a look at my repo https://github.com/pawelmorawiecki/traffic_jam_Nairobi and try to run the code. It generates the csv file with predictions and then compare the file with yours.
I got it right finally. Thank you
Whenever I get that error, it turns out my csv file has 3 columns. This happens because I am using pandas to output results, and the .to_csv() method returns a .csv file with the index as one of the columns. If this is your problem, you can adjust this within your code or manually fix the .csv file.
Hi. First of all try to print the head() or columns() before saving it into a file to confirm the output of the predictions which should be ride_id and number_of_ticket.
Thank you all. Turns out i hadn't done proper preprocessing. But now my csv is okay.