1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] Combining data with multiple dates into one row for each case

Discussão em 'Python' iniciado por Stack, Setembro 14, 2024.

  1. Stack

    Stack Membro Participativo

    I have been looking through and trying to figure it out but need some help. I have a bunch of data and each row has a 4 date fields. The first date field is a duplicate for the ID number and sometimes not. It looks a little like this:

    [​IMG]

    I would like to clean it up to combine them into one row for each ID number. It would look like this:

    [​IMG]

    I tried the pivot method but it didn't work because of my duplicate values in the first two sets of dates. Anyone have any insight into what could make this work?

    Continue reading...

Compartilhe esta Página