Chapter 15: Appendix

Solution 1.1

Perform the following steps to complete the activity:

  1. Open a new Jupyter notebook and select the Pandas_Workshop kernel.
  2. Import pandas and random into your notebook:

    import pandas as pd

    import random

  3. Load the DataFrame for Store1:

    Store1 = pd.read_csv('../Datasets/Store1.csv')

    Store1.head()

    Note

    Please change the path of the dataset file (highlighted) based on where you have downloaded it in your system.

You should get the following output:

Figure 15.1 – Sales figures of the first store

Figure 15.1 – Sales figures of the first store

  1. Similarly, load the DataFrame for Store2:

    Store2 = pd.read_csv('../Datasets/Store2.csv')

    Store2.head()

    Note

    Please change the path ...

Get The Pandas Workshop 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.