Writing Efficient Code with pandas
Offered By: DataCamp
Course Description
Overview
Learn efficient techniques in pandas to optimize your Python code.
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.
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.
Syllabus
- Selecting columns and rows efficiently
- This chapter will give you an overview of why efficient code matters and selecting specific and random rows and columns efficiently.
- Replacing values in a DataFrame
- This chapter shows the usage of the replace() function for replacing one or multiple values using lists and dictionaries.
- Efficient iterating
- This chapter presents different ways of iterating through a Pandas DataFrame and why vectorization is the most efficient way to achieve it.
- 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.
Taught by
Leonidas Souliotis
Related Courses
Amazon SageMaker: Build an Object Detection Model Using Images Labeled with Ground Truth (Vietnamese)Amazon Web Services via AWS Skill Builder Amazon SageMaker: Build an Object Detection Model Using Images Labeled with Ground Truth (German)
Amazon Web Services via AWS Skill Builder Amazon SageMaker: Build an Object Detection Model Using Images Labeled with Ground Truth (Korean)
Amazon Web Services via AWS Skill Builder Amazon SageMaker: Build an Object Detection Model Using Images Labeled with Ground Truth (Simplified Chinese)
Amazon Web Services via AWS Skill Builder Amazon SageMaker: Build an Object Detection Model Using Images Labeled with Ground Truth (French)
Amazon Web Services via AWS Skill Builder