Streamlip app not searching files in the good directory
In which directory are you standing when you are running your code?
From your error message I would assume that you are standing in /Users/myname/ which makes python look for data as a subdirectory of /Users/myname/.
But if you first change directory to /Users/myname/Documents/Master2/Python/Final_Project and then run your code from there I think it would work.
I am trying to run a Streamlit app importing pickle files and a DataFrame. The pathfile for my script is :

/Users/myname/Documents/Master2/Python/Final_Project/streamlit_app.py

And the one for my DataFrame is:

/Users/myname/Documents/Master2/Python/Final_Project/data/metabolic_syndrome.csv

One could reasonably argue  that I only need to specify df = pd.read_csv('data/df.csv') yet it does not work as the Streamlit app is unexpectedly not searching in its directory:

FileNotFoundError: [Errno 2] No such file or directory: '/Users/myname/data/metabolic_syndrome.csv'

How can I manage to make the app look for the files in the good directory (the one where it is saved) without having to use absolute pathfiles ?