How to retrieve files from your Drive D?
Your course named Python for Finance
refers. While I was reading section 4.2
(Running a Regression in Python), it states
Data =
pd.read_excel(D:/Python/Data_Files/Housing.xlse) (See picture below)
Question: How to retrieve the specified
file from your Drive D?
Pls kindly reply. Appreciated.
Hi Huang!
Thanks for reaching out.
Written this way, this line of code will allow you to obtain the data from the Excel file called Housing.xlsx if and only if you've placed it in a directory named Data_Files, stored within another folder called Python on your drive D.
If that's not the case, please feel free to alter the directory path so that it leads to the folder where you've stored that file.
Finally, you can opt for a shorter line of code. If you store Housing.xlsx in the same folder as the Notebook Document you are currently working on, please use only the file's name and extension within the parentheses like this:
data = pd.read_excel('Housing.xlsx')
Hope this helps.
Best,
Martin
Dear Martin,
My apology. Perhaps I did not put my question right previously. Here is my question:
I have problem getting the file 'housing. xlsx' as it is not in the resouces. Please advise how to DOWNLOAD the file 'Housing.xlsx' from the data source? Alternatively, please provide me the link which links to the data source.
pls help again.
Huang
As far as I know you can work on any data sources from kaggle.com
Hi Huang and Moh!
Thanks for reaching out.
Please access the following lecture from the course:
https://learn.365datascience.com/courses/python-for-finance/running-a-regression-in-python/
Then, scroll down until you get to below the video, and select Running a Regression in Python - Dataset Housing:
Thus, you can download the relevant dataset.
Hope this helps.
Best,
Martin