'Why are paths to file in project extended in VS code?

I have cloned a project from GitHub to VS code. There is a folder data in that project which contains file train.csv. But when I try to read it in .py file in that project, path data/train.csv doesn't work. When I copy path of file it shows /Users/me/Desktop/my_project/data/train.csv. Why does it happen? And how to fix it?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source