I was wondering if there is any function/tool in Python which allows me to get the absolute path of a file directly from the computer, instead of having to manually search for the absolute path of the particular file, or having to shift the file to the same folder as the script. I am trying to access a .csv file stored in another folder different from my python script.
You can use the os.path module. See the join method which will accept relative path fragments and the abspath method which will give you the absolute path.
Is there a way to get an absolute path of a file which is not in the current working directory (in Python)?