Skip to main content
HomePythonReshaping Data with pandas

Reshaping Data with pandas

Reshape DataFrames from a wide to long format, stack and unstack rows and columns, and wrangle multi-index DataFrames.

Comece O Curso Gratuitamente
4 Horas15 Videos52 Exercicios
15.285 AprendizesTrophyDeclaração de Realização

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.
GroupTreinar 2 ou mais pessoas?Experimente o DataCamp For Business

Loved by learners at thousands of companies


Descrição do 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.
Para Empresas

GroupTreinar 2 ou mais pessoas?

Obtenha acesso à biblioteca completa do DataCamp, com relatórios, atribuições, projetos e muito mais centralizados
Experimente O DataCamp for BusinessPara uma solução sob medida , agende uma demonstração.

Nas seguintes faixas

Data Manipulation com Python

Ir para a trilha

Importação e limpeza de dados com Python

Ir para a trilha
  1. 1

    Introduction to Data Reshaping

    Grátis

    Let'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.

    Reproduzir Capítulo Agora
    Wide and long data formats
    50 xp
    The long and the wide
    100 xp
    Flipping players
    100 xp
    Reshaping using pivot method
    50 xp
    Dribbling the pivot method
    100 xp
    Offensive or defensive player?
    100 xp
    Replay that last move!
    100 xp
    Pivot tables
    50 xp
    Reviewing the moves
    100 xp
    Exploring the big match
    100 xp
    The tallest and the heaviest
    100 xp
  2. 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.

    Reproduzir Capítulo Agora
  3. 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.

    Reproduzir Capítulo Agora
Para Empresas

GroupTreinar 2 ou mais pessoas?

Obtenha acesso à biblioteca completa do DataCamp, com relatórios, atribuições, projetos e muito mais centralizados

Nas seguintes faixas

Data Manipulation com Python

Ir para a trilha

Importação e limpeza de dados com Python

Ir para a trilha

Conjuntos De Dados

Customer churn dataBooks dataFIFA players dataObesity data

Colaboradores

Collaborator's avatar
Amy Peterson
Collaborator's avatar
Maggie Matsui
Maria Eugenia Inzaugarat HeadshotMaria Eugenia Inzaugarat

Data Scientist and Artificial Intelligence Consultant

Veja Mais

O que os outros alunos têm a dizer?

Cadastre-se mais 13 milhões de alunos e comece Reshaping Data with pandas Hoje!

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.