https://365datascience.com/dwqa-answer/answer-for-loading-of-csv-file-to-my-notekbook-and-getting-error/ -
Hi Oberewu,
Are you sure that the Jupyter notebook file and the dataset are in the same folder? Usually that’s the easiest way to approach the issue.
However, if you still have a problem with that, then you can use the absolute path of a file when loading the data.
Thus, you can write: data = pd.read_csv(‘ABSOLUTE_PATH/1.01. Simple linear regression.csv’)
To me this looks like: data = pd.read_csv(‘C:/Users/365/Desktop/Advanced_Statistical_Methods_(Machine_Learning)/1.01. Simple linear regression.csv’)
In your case, you can find that by opening the folder containing the files and copy-pasting the path.
Once you copy-paste this path, you should CHANGE ALL SLASHES from backward to forward.
This means that if your path is C:\Users\YOUR_COMPUTER_NAME\Desktop\… , you should make it look like: C:/Users/YOUR_COMPUTER_NAME/Desktop/…
Note that, due to the standards for referencing paths, in Python, instead of a backward slash ( \ ), you should use a forward slash ( / ).
#365datascience #DataScience #data #science #365datascience #BigData #tutorial #infographic #career #salary #education #howto #scientist #engineer #course #engineer #MachineLearning #machine #learning #certificate #udemy
No comments:
Post a Comment