wrote the code again, attached another csv file. The problem with this part of the code is solved, moving on Thanks