[Python] How to calculate "churned" customers in Pandas? (Customers who have stopped buying...

Discussão em 'Python' iniciado por Stack, Julho 29, 2025.

  1. Stack

    Stack Membro Participativo

    I've cleaned and formatted some data. Among others, I have these columns: Name, Order Date, and Subscription (which has booleans).

    How would you acheive this in pandas?

    Example DataFrame:

    Date Name Subscription
    2020/06 Super Mario False

    2020/06 Princess Peach False

    2020/06 Bowser False

    2020/06 Koopa False

    2020/06 Yoshi False


    Many of these customers show up with multiple dates.

    Continue reading...

Compartilhe esta Página