CHAPTER 7Jupyter Notebook
A Jupyter Notebook provides a shell for performing computation and data analysis and is often used by data scientists and others in scientific fields. The notebook consists of cells, each of which is a multiline text input field. The output of the cell can be HTML, rich text, values, and charts, as well as tables. The Python extension for Visual Studio Code provides Jupyter Notebook support. You can open, create, and modify .ipynb
files directly in the editor. Within Visual Studio Code, you can take advantage of all its editing and debugging features that aren't typically available for notebooks in a browser.
This chapter explores Jupyter Notebook features using data provided by Kaggle for the World Happiness Report 2019. The report ranks 155 countries by their happiness levels based on happiness scores and rankings data from the Gallup World Poll. To learn more about the data set, visit www.kaggle.com/unsdsn/world-happiness
. The files for the exercises in this chapter are in the world_happiness_report
folder.
Before proceeding with the exercises, open the folder and activate a virtual or Conda environment. If using a virtual environment, install the following packages that are used to create visualizations:
pip install pandas
pip install matplotlib.pylot
pip install seaborn ...
Get Visual Studio Code for Python Programmers now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.