Writing Efficient Code with pandas

Learn efficient techniques in pandas to optimize your Python code.
Start Course for Free
4 Hours14 Videos45 Exercises8,275 Learners
3500 XP

Create Your Free Account

GoogleLinkedInFacebook
or
By continuing you accept the Terms of Use and Privacy Policy. You also accept that you are aware that your data will be stored outside of the EU and that you are above the age of 16.

Loved by learners at thousands of companies


Course Description

The ability to efficiently work with big datasets and extract valuable information is an indispensable tool for every aspiring data scientist. When working with a small amount of data, we often don’t realize how slow code execution can be. This course will build on your knowledge of Python and the pandas library and introduce you to efficient built-in pandas functions to perform tasks faster. Pandas’ built-in functions allow you to tackle the simplest tasks, like targeting specific entries and features from the data, to the most complex tasks, like applying functions on groups of entries, much faster than Python's usual methods. By the end of this course, you will be able to apply a function to data based on a feature value, iterate through big datasets rapidly, and manipulate data belonging to different groups efficiently. You will apply these methods on a variety of real-world datasets, such as poker hands or restaurant tips.

  1. 1

    Selecting columns and rows efficiently

    Free
    This chapter will give you an overview of why efficient code matters and selecting specific and random rows and columns efficiently.
    Play Chapter Now
  2. 2

    Replacing values in a DataFrame

    This chapter shows the usage of the replace() function for replacing one or multiple values using lists and dictionaries.
    Play Chapter Now
  3. 3

    Efficient iterating

    This chapter presents different ways of iterating through a Pandas DataFrame and why vectorization is the most efficient way to achieve it.
    Play Chapter Now
  4. 4

    Data manipulation using .groupby()

    This chapter describes the groupby() function and how we can use it to transform values in place, replace missing values and apply complex functions group-wise.
    Play Chapter Now
In the following tracks
Python Programming
Collaborators
Hadrien LacroixHillary Green-Lerman
Leonidas Souliotis Headshot

Leonidas Souliotis

PhD @ University of Warwick
Leonidas Souliotis is a PhD student at the University of Warwick, UK. His research interests lie in the field of bioinformatics, machine learning, and deep learning. Before that, he completed his MSc in Statistics degree from Imperial College London, UK, and his BSc in Statistics and Insurance Science from the University of Piraeus. He has worked in different areas of applied statistics and machine learning, both inside and outside academia. This includes stock trading, epidemiology and biology.
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