It's hard to know since I don't have access to "HaircutNEW" dataset, could you ask this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.
Also, if you have a question about your homework, we encourage you to first contact your course instructor or teaching assistants directly. Firstly, that is what they are there for. Also, your questions serve as good feedback to help them improve how they teach the course.