Open marielledado opened 4 years ago
P.S. I just had a look at what highlight_max()
in the pandas
docs, guess the effect simply doesn't appear in notebooks pushed to GitHub!
Hi Marielle, Thanks a lot for your feedback.
highlight_max()
was used to highlight a country (with green color) which has maximum score in a particular criteria (e.g., Qatar has highest score on GDP per capita
).
As someone else already pointed out the problem with applying style to a data frame in a bootcamp-help channel thread, GitHub strips CSS and javascript from notebook files as a security measure. We can see the highlighted color either by running Jupyter Notebook locally or by pasting the notebook link to https://nbviewer.jupyter.org/.
In the final presentation, I used the below link to explain the same notebook and here you can also notice the effect of using highlight_max()
method.
https://nbviewer.jupyter.org/github/write2sushma/Capstone-14/blob/master/happiness_report.ipynb
Yes, the question was answered using correlation matrix. I agree that the order of question doesn't match with order of analysis in notebook. I will fix it and will also add some comments to make it more readable and clear.
Hello Team 14,
congratulations on finishing the bootcamp and your capstone!
I really appreciate that you tried out a lot of Python and
pandas
tricks in your project, such as list comprehension, function definition andmatplotlib
subplots. I also liked that you used text cells to explain your code so that it's easy for me as a reader to follow.I have a question: what does your function
highlight_max()
do? The output only shows a plain table.Here are some things I would improve:
It would have been good try merging the 3 dataframes you had so you could practice those skills as well. The
"Country"
column could have been a good key. You could try:pd.merge([df_2017, df_2018, df_2019], on="Country")
That would have allowed you to easily see how the different values (happiness, GDP, life expectancy etc) change over time within countries. Would also be interesting to explore whether the same countries appear in the Top 10 every year, or if it changes.When coding in Jupyter Lab, you can use this line
%matplotlib inline
. Place it in the same cell as your library imports so that your notebook will automatically display your graphs (i.e., you won't need to writeplt.show()
everytime!)For the last barchart, I would use
plt.subplots()
so that you can control the size of the figure and how the xtick labels appear so they don't overlapCheers, Marielle