Appendix

1. Introduction to Jupyter Notebooks

Activity 1.01: Using Jupyter to Learn about pandas DataFrames

Solution:

  1. Start one of the following platforms to run Jupyter Notebooks:

    Jupyter Notebook (run jupyter notebook)

    JupyterLab (run jupyter lab)

    Then, open the platform in your web browser by copying and pasting the URL, as prompted in the Terminal.

  2. Load the numpy library as follows:

    import numpy as np

  3. Import pandas, as follows:

    import pandas as pd

  4. Pull up the docstring for the pandas DataFrame object, as follows:

    pd.DataFrame?

    The output is as follows:

    Figure 1:39: The docstring for pd.DataFrame

    Figure 1:39: The docstring for pd.DataFrame

  5. Use a dictionary to create a DataFrame with fruit ...

Get The Applied Data Science Workshop - Second Edition 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.