dirname = os.path.dirname(__file__) filename = os.path.join(dirname, f'relativePathfile.csv') # filename returns the absolute path