Homework 5
Problem 1 (4 points)
It is possible to get several indicators' data trough quandl by just typing their names inside a list and passing as an argument to the get() function from quandl library as follows:
data = quandl.get(["FRED/NROUST","FRED/NROU"])
where NROUST stands for the Natural Rate of Unemployment Short-term, and NROU stands for the Natural Rate of Unemployment (long-term).
- Use quandl, to get GDP data on Germany (FRED/DEURGDPQDSNAQ) and on Italy (FRED/ITARGDPQDSNAQ).
- Use quandl, to get GDP data on Cambodia (FRED/MKTGDPCHA646NWDB) and on Switzerland (FRED/MKTGDPKHA646NWDB).
- For both of the above datasets/dataframes, create correlation matrix and save it to a an Excel file.
- Open those 2 Excel files and use Conditional Formatting to Highlight correlations.
Note: each of the points above is worth one mark
Problem 2 (4 points)
Change the Jupyter Notebook section to Markdown (given in the dropdown menu from the panel above) to be able to write a text and not a code inside the Notebook.
Then, answer the following questions:
- Whenever there are nested IFs, one may consider using VLOOKUP function. For what purpose would you use the Approximate (TRUE) match rather than the Exact (FALSE) option?
- What are the disadvantages of VLOOKUP and how can they be "corrected"?
- How the while and for loops differ and when you may apply while instead of for?
- What is the difference between return and print inside a function defined in Python?
Note: each of the points above is worth one mark