Skip to main content
HomePython

Writing Efficient Code with pandas

4.4+
11 reviews
Intermediate

Learn efficient techniques in pandas to optimize your Python code.

Start Course for Free
4 hours14 videos45 exercises20,193 learnersTrophyStatement of Accomplishment

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.
Group

Training 2 or more people?

Try DataCamp for Business

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.
For Business

Training 2 or more people?

Get your team access to the full DataCamp platform, including all the features.
DataCamp for BusinessFor a bespoke solution book a demo.
  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
    The need for efficient coding I
    50 xp
    What does time.time() measure?
    50 xp
    Measuring time I
    100 xp
    Measuring time II
    100 xp
    Locate rows: .iloc[] and .loc[]
    50 xp
    Row selection: loc[] vs iloc[]
    100 xp
    Column selection: .iloc[] vs by name
    100 xp
    Select random rows
    50 xp
    Random row selection
    100 xp
    Random column selection
    100 xp
For Business

Training 2 or more people?

Get your team access to the full DataCamp platform, including all the features.

datasets

PokerPopular Baby NamesRestaurant

collaborators

Collaborator's avatar
Hillary Green-Lerman
Collaborator's avatar
Hadrien Lacroix
Leonidas Souliotis HeadshotLeonidas 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

Don’t just take our word for it

*4.4
from 11 reviews
64%
18%
18%
0%
0%
  • Joel N.
    11 months

    The course was great and was fantastic in enabling one to know how to optimize their code to run faster and use resources efficiently.

  • Jakub Ż.
    about 1 year

    Yes

  • Kalyan B.
    over 1 year

    ;

  • Octavio T.
    over 1 year

    Great course

  • Zinovii M.
    over 1 year

    Good to systemize knowledge

"The course was great and was fantastic in enabling one to know how to optimize their code to run faster and use resources efficiently."

Joel N.

"Yes"

Jakub Ż.

";"

Kalyan B.

Join over 15 million learners and start Writing Efficient Code with pandas today!

Create Your Free Account

GoogleLinkedInFacebook

or

By continuing, you accept our Terms of Use, our Privacy Policy and that your data is stored in the USA.