Writing Efficient Code with pandas
Learn efficient techniques in pandas to optimize your Python code.
Comece O Curso Gratuitamente4 horas14 vídeos45 exercícios20.162 aprendizesDeclaração de Realização
Crie sua conta gratuita
ou
Ao continuar, você aceita nossos Termos de Uso, nossa Política de Privacidade e que seus dados são armazenados nos EUA.Treinar 2 ou mais pessoas?
Tentar DataCamp for BusinessAmado por alunos de milhares de empresas
Descrição do Curso
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.
Treinar 2 ou mais pessoas?
Obtenha acesso à sua equipe à plataforma DataCamp completa, incluindo todos os recursos.- 1
Selecting columns and rows efficiently
GratuitoThis chapter will give you an overview of why efficient code matters and selecting specific and random rows and columns efficiently.
The need for efficient coding I50 xpWhat does time.time() measure?50 xpMeasuring time I100 xpMeasuring time II100 xpLocate rows: .iloc[] and .loc[]50 xpRow selection: loc[] vs iloc[]100 xpColumn selection: .iloc[] vs by name100 xpSelect random rows50 xpRandom row selection100 xpRandom column selection100 xp - 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.
Replace scalar values using .replace()50 xpReplacing scalar values I100 xpReplace scalar values II100 xpReplace values using lists50 xpReplace multiple values I100 xpReplace multiple values II100 xpReplace values using dictionaries50 xpReplace single values I100 xpReplace single values II100 xpReplace multiple values III100 xpMost efficient method for scalar replacement50 xp - 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.
Looping using the .iterrows() function50 xpCreate a generator for a pandas DataFrame100 xpThe iterrows() function for looping100 xpLooping using the .apply() function50 xp.apply() function in every cell100 xp.apply() for rows iteration100 xpVectorization over pandas series50 xpWhy vectorization in pandas is so fast?50 xppandas vectorization in action100 xpVectorization with NumPy arrays using .values()50 xpBest method of vectorization50 xpVectorization methods for looping a DataFrame100 xp - 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.
Data transformation using .groupby().transform50 xpThe min-max normalization using .transform()100 xpTransforming values to probabilities100 xpValidation of normalization100 xpWhen to use transform()?50 xpMissing value imputation using transform()50 xpIdentifying missing values100 xpMissing value imputation100 xpData filtration using the filter() function50 xpWhen to use filtration?50 xpData filtration100 xpCongratulations!50 xp
Treinar 2 ou mais pessoas?
Obtenha acesso à sua equipe à plataforma DataCamp completa, incluindo todos os recursos.colaboradores
pré-requisitos
Data Manipulation with pandasLeonidas Souliotis
Ver MaisPhD @ University of Warwick
O que os outros alunos têm a dizer?
Junte-se a mais de 15 milhões de alunos e comece Writing Efficient Code with pandas hoje mesmo!
Crie sua conta gratuita
ou
Ao continuar, você aceita nossos Termos de Uso, nossa Política de Privacidade e que seus dados são armazenados nos EUA.