Skip to main content

Data Types for Data Science in Python

Consolidate and extend your knowledge of Python data types such as lists, dictionaries, and tuples, leveraging them to solve Data Science problems.

Start Course for Free
4 Hours18 Videos58 Exercises50,369 Learners4850 XPPython Programmer Track

Create Your Free Account



By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA. You confirm you are at least 16 years old (13 if you are an authorized Classrooms user).

Loved by learners at thousands of companies

Course Description

Have you got your basic Python programming chops down for Data Science but are yearning for more? Then this is the course for you. Herein, you'll consolidate and practice your knowledge of lists, dictionaries, tuples, sets, and date times. You'll see their relevance in working with lots of real data and how to leverage several of them in concert to solve multistep problems, including an extended case study using Chicago metropolitan area transit data. You'll also learn how to use many of the objects in the Python Collections module, which will allow you to store and manipulate your data for a variety of Data Scientific purposes. After taking this course, you'll be ready to tackle many Data Science challenges Pythonically.

  1. 1

    Fundamental data types


    This chapter will introduce you to the fundamental Python data types - lists, sets, and tuples. These data containers are critical as they provide the basis for storing and looping over ordered data. To make things interesting, you'll apply what you learn about these types to answer questions about the New York Baby Names dataset!

    Play Chapter Now
    Introduction and lists
    50 xp
    Manipulating lists for fun and profit
    100 xp
    Looping over lists
    100 xp
    Meet the Tuples
    50 xp
    Data type usage
    50 xp
    Using and unpacking tuples
    100 xp
    Making tuples by accident
    100 xp
    Sets for unordered and unique data
    50 xp
    Finding all the data and the overlapping data between sets
    100 xp
    Determining set differences
    100 xp
  2. 2

    Dictionaries - the root of Python

    At the root of all things Python is a dictionary. Herein, you'll learn how to use them to safely handle data that can viewed in a variety of ways to answer even more questions about the New York Baby Names dataset. You'll explore how to loop through data in a dictionary, access nested data, add new data, and come to appreciate all of the wonderful capabilities of Python dictionaries.

    Play Chapter Now
  3. 4

    Handling Dates and Times

    Handling times can seem daunting at time, but here, you'll dig in and learn how to create datetime objects, print them, look to the past and to the future. Additionally, you'll learn about some third party modules that can make all of this easier. You'll continue to use the Chicago Transit dataset to answer questions about transit times.

    Play Chapter Now

In the following tracks

Python Programmer


hugobowneHugo Bowne-AndersonyashasYashas Roy


Intermediate Python
Jason Myers Headshot

Jason Myers

Co-Author of Essential SQLAlchemy and Software Engineer

Jason Myers is a software engineer and author. His area of expertise is in developing data analytics platforms. He has also written the Essential SQLAlchemy book, co-authored with Rick Copeland, that introduces you to working with relational databases in Python.
See More

What do other learners have to say?

I've used other sites—Coursera, Udacity, things like that—but DataCamp's been the one that I've stuck with.

Devon Edwards Joseph
Lloyds Banking Group

DataCamp is the top resource I recommend for learning data science.

Louis Maiden
Harvard Business School

DataCamp is by far my favorite website to learn from.

Ronald Bowers
Decision Science Analytics, USAA