Issue
I have no idea why this happens. Sometimes it reads the dataset by just providing the filename (dataset belonging to the same directory as the code) while other times it requires complete path of the file. I am using Spyder IDE and Pandas to read the file. My OS is macOS Mojave.
Solution
You can check the current working directory set in spyder using:
import os
print(os.getcwd())
Once this is known, you know whether your file is in the same path. If not, you can do two things:
Using Tools > Preferences > Current working directory you can change the path to what you want
or programatically do the same thing as follows:
os.chdir('/Users/theroy/mlp')
Answered By - The Roy
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.