Reshaping Data with pandas
Reshape DataFrames from a wide to long format, stack and unstack rows and columns, and wrangle multi-index DataFrames.
Comience El Curso Gratis4 horas15 vídeos52 ejercicios
Crea Tu Cuenta Gratuita
o
Al continuar, acepta nuestros Términos de uso, nuestra Política de privacidad y que sus datos se almacenan en los EE. UU.¿Entrenar a 2 o más personas?Pruebe DataCamp para empresas
Preferido por estudiantes en miles de empresas
Descripción del curso
Often data is in a human-readable format, but it’s not suitable for data analysis. This is where pandas can help—it’s a powerful tool for reshaping DataFrames into different formats. In this course, you’ll grow your data scientist and analyst skills as you learn how to wrangle string columns and nested data contained in a DataFrame. You’ll work with real-world data, including FIFA player ratings, book reviews, and churn analysis data, as you learn how to reshape a DataFrame from wide to long format, stack and unstack rows and columns, and get descriptive statistics of a multi-index DataFrame.
Empresas
¿Entrenar a 2 o más personas?
Obtenga acceso de su equipo a la biblioteca completa de DataCamp, con informes centralizados, tareas, proyectos y másEn las siguientes pistas
Manipulación de datos en Python
Ir a la pistaImportar y limpiar datos en Python
Ir a la pista- 1
Introduction to Data Reshaping
GratuitoLet's start by understanding the concept of wide and long formats and the advantages of using each of them. You’ll then learn how to pivot data from long to a wide format, and get summary statistics from a large DataFrame.
Wide and long data formats50 xpThe long and the wide100 xpFlipping players100 xpReshaping using pivot method50 xpDribbling the pivot method100 xpOffensive or defensive player?100 xpReplay that last move!100 xpPivot tables50 xpReviewing the moves100 xpExploring the big match100 xpThe tallest and the heaviest100 xp - 2
Converting Between Wide and Long Format
Master the technique of reshaping DataFrames from wide to long format. In this chapter, you'll learn how to use the melting method and wide to long function before discovering how to handle string columns by concatenating or splitting them.
Reshaping with melt50 xpGothic times100 xpRating is not everything100 xpHow is Frankenstein, Dorian Gray?100 xpWide to long function50 xpThe golden age100 xpDecrypting the code100 xpTime to read, Katniss!100 xpWorking with string columns50 xpDid you say dystopia?100 xpWhat's your rating, Harry?100 xpElementary, dear Watson!100 xp - 3
Stacking and Unstacking DataFrames
In this chapter, you’ll level-up your data manipulation skills using multi-level indexing. You'll learn how to reshape DataFrames by rearranging levels of the row indexes to the column axis, or vice versa. You'll also gain the skills you need to handle missing data generated in the stacking and unstacking processes.
Stacking DataFrames50 xpStack the calls!100 xpPhone directory index100 xpText me!100 xpUnstacking DataFrames50 xpInternational caller100 xpCall another time100 xpOrganizing your voicemail100 xpWorking with multiple levels50 xpSwap your SIM card100 xpTwo many calls100 xpHandling missing data50 xpA missed phone call100 xpDon't drop the stack100 xp - 4
Advanced Reshaping
You'll finish by learning how to combine the reshaping process with grouping to produce quick data manipulations. Lastly, you'll discover how to transform list-like columns and handle complex nested data, such as nested JSON files.
Reshaping and combining data50 xpLess fast food, please!100 xpOnly going up100 xpA group analysis100 xpTransforming a list-like column50 xpMerge it all100 xpExplode the bounds100 xpThe good old split100 xpReading nested data into a DataFrame50 xpNested movies100 xpA complex film100 xpDealing with nested data columns50 xpUn-nesting birds100 xpDon't dump the bird100 xpThe final reshape50 xp
Empresas
¿Entrenar a 2 o más personas?
Obtenga acceso de su equipo a la biblioteca completa de DataCamp, con informes centralizados, tareas, proyectos y másEn las siguientes pistas
Manipulación de datos en Python
Ir a la pistaImportar y limpiar datos en Python
Ir a la pistacolaboradores
requisitos previos
Data Manipulation with pandasMaria Eugenia Inzaugarat
Ver MásData Scientist and Artificial Intelligence Consultant
¿Qué tienen que decir otros alumnos?
¡Únete a 14 millones de estudiantes y empieza Reshaping Data with pandas hoy mismo!
Crea Tu Cuenta Gratuita
o
Al continuar, acepta nuestros Términos de uso, nuestra Política de privacidad y que sus datos se almacenan en los EE. UU.