I am writing a loop to plot data using matplotlib. to start, I have
path = os.listdir('/users/me/path_to_folder_with_data')
for file in path:
code that I know works for plotting data
But when I run this, I get an error that says [Errno 2] No such file or directory: 'data1.txt'
Is it trying to run from the folder that the program is saved in? This seemed to be the solution in similar questions here, but if thats true, why isn't it running from my path?