I am a beginner with Jupyter Notebook but here's what I am having trouble with:
I have created a Python3 file using Jupyter Notebook and have imported my csv file using read_csv.
Then, I created a new folder (named Park )- that would include my python file, and the csv file needed (named MyFile.csv). The purpose is to be able to run the python file from any computer- not just my own- using this relative path.
So, I do:
import pandas as pd
data=pd.read_csv('Park/MyFile.csv')
data.head()
And I get this error:
No such file or directory: 'Park/MyFile.csv'.
On the contrary, when I simply run this:
import pandas as pd
data=pd.read_csv('MyFile.csv')
data.head()
It runs fine. But will this work (only including the file's name) when I try to run the Python file from other computers?
All I am trying to do is to be able to send out the folder (as zipped maybe?) and have it run smoothly in any computer using a relative path for the csv files.
Any suggestion would be appreciated.
Thanks!