Coursera 笔记

Module 01 · Course Introduction and Python Basics

(Optional) Basics of Jupyter Notebooks(可选)Jupyter Notebook 基础

Coursera ↗

The Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and explanatory text. Uses include data cleaning and transformation, numerical simulation, statistical modeling, machine learning and, much more.”
Jupyter Notebook 是一个开源的网页应用程序,允许您创建和共享包含实时代码、方程式、可视化和说明性文本的文档。其用途包括数据清洗和转换、数值模拟、统计建模、机器学习等。”

– description from Project Jupyter
– 来自 Project Jupyter 的描述

Jupyter Notebook has become the "tool of choice" for the modern Data Scientist. Jupyter took the concept of a paper notebook that scientists use to record experiments and made it digital and interactive. It is also a fantastic learning tool that allows researchers, teachers, and learners to combine computations with descriptive text, multimedia, and graphs. It helps to document experiments by combining computation (code and data) and a narrative explanation, share it with others, and to have it come alive clearly explaining your findings and the path you took to arrive at your conclusions. In short, it helps you tell a story about your experiment. You can also say that Jupyter Notebook and its more modern version JupyterLab is an Integrated Development Environment (IDE). But we prefer to think of it as a storytelling tool that makes data come alive.
Jupyter Notebook 已成为现代数据科学家的“首选工具”。Jupyter 将科学家用于记录实验的纸质笔记本概念数字化并使其具有交互性。它也是一个极佳的学习工具,允许研究人员、教师和学习者将计算与描述性文本、多媒体和图表相结合。它通过结合计算(代码和数据)和叙述性解释来记录实验,与他人分享,并清晰地解释您的发现以及您得出结论的路径。简而言之,它帮助您讲述实验的故事。您也可以说 Jupyter Notebook 及其更现代的版本 JupyterLab 是一个集成开发环境(IDE)。但我们更倾向于将其视为一个让数据生动起来的故事讲述工具。

To make it easy for you to get started, hands-on labs and assignments in this course will use a virtual JupyterLab Notebook environment provided by the Skills Network Labs. You will find it very convenient as you will not have to download, install, or configure any software. You will simply click on the "Open Tool" button. It's like magic!
为了让您轻松上手,本课程中的实践实验室和作业将使用 Skills Network Labs 提供的虚拟 JupyterLab Notebook 环境。您会发现它非常便捷,因为您无需下载、安装或配置任何软件。您只需点击“打开工具”按钮即可。这简直就像魔法一样!

Note: you can get your own Jupyter Notebooks is by installing Anaconda or you can use Jupyter Notebooks in IBM Watson Studio (we will go in-depth about this later in the course). We don't recommend doing it at this time at the risk of getting distracted. Like a real Data Scientist, you will use Jupyter to:
注意:您可以通过安装 Anaconda 来获取自己的 Jupyter Notebooks,或者您可以在 IBM Watson Studio 中使用 Jupyter Notebooks(我们将在课程后面深入探讨这一点)。我们不建议您此时这样做,以免分心。像一位真正的数据科学家一样,您将使用 Jupyter 来:

  • Write and run interactive code (we use Python in this course),
    编写和运行交互式代码(本课程使用 Python),
  • Document and explain what you were doing using markdown text,
    使用 Markdown 文本记录和解释您所做的事情。
  • Share your notebooks with other learners, colleagues, and even the world.
    与其他学习者、同事甚至全世界分享您的笔记本。

Here are just a few very useful tips for using a Jupyter Notebook. Jupyter Notebooks are composed of cells. Each cell can be either:
以下是使用 Jupyter Notebook 的一些非常有用的技巧。Jupyter Notebook 由单元格组成。每个单元格可以是:

  • a code cell containing computer code (Python in our course),
    一个包含计算机代码(在我们的课程中是 Python)的代码单元格,
  • or a markdown cell containing text, pictures, videos, etc. formatted with markdown (a very simple formatting language).
    或一个包含使用 Markdown 格式化(一种非常简单的格式化语言)的文本、图片、视频等的 Markdown 单元格。
  1. To get an output from a code cell, you have to run the cell. To run the cell, place your cursor in the cell and click on the Cell menu on the top and click Run Cells. To use a shortcut, press Shift + Enter.
    要从代码单元中获取输出,您必须运行该单元。要运行单元,将光标置于单元中,点击顶部菜单中的单元菜单,然后点击运行单元。要使用快捷方式,请按 Shift + Enter。

  1. To add a new cell: Click on Insert and insert cell above or below depending on your preference.
    添加新单元:点击插入,根据您的偏好选择在上方或下方插入单元。

  1. To delete a cell. Click on Edit and choose Delete Cells
    删除单元:点击编辑,选择删除单元。

  1. For a full list of the shortcuts, click on the Help button.
    查看所有快捷方式的完整列表,请点击帮助按钮。

The next lesson will be an optional Python notebook to get you familiar with the pandas and numpy libraries.
下一课将是一个可选的 Python 笔记本,帮助您熟悉 pandas 和 numpy 库。