Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
The Applied Data Science Workshop

You're reading from   The Applied Data Science Workshop Get started with the applications of data science and techniques to explore and assess data effectively

Arrow left icon
Product type Paperback
Published in Jul 2020
Publisher Packt
ISBN-13 9781800202504
Length 352 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Alex Galea Alex Galea
Author Profile Icon Alex Galea
Alex Galea
Arrow right icon
View More author details
Toc

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

  5. Use a dictionary to create a DataFrame with fruit and score columns, as follows:
    fruit_scores = {'fruit': ['apple', 'orange', \
                              'banana', 'blueberry'], \
       ...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image