Hi, Sid replace "7" with "5" or "6" in your screenshot in the line
csv_file_name = csv_file.split('\\')[7]
Now, why do we do this?
When I was running the code, my path was this mentioned below, when you use .split('\\') function on the below path, it splits everything that comes before and after\\ and converts it into a list.

So, try debugging on your side, print(csv_file) and see the actual path.