[Python] How to select / save rows with multiple same value in Pandas?

Discussão em 'Python' iniciado por Stack, Maio 10, 2025.

  1. Stack

    Stack Membro Participativo

    I have financial data where I need to save / find rows that have multiple same value and a condition where the same value happened more than / = 2 and not (value)equal to 0 or < 1.

    Say I have this:

    A B C D E F G H I
    5/7/2025 21:00 0 0 0 0 0 0 0 0
    5/7/2025 21:15 0 0 19598.8 0 19598.8 0 0 0
    5/7/2025 21:30 0 0 0 0 0 0 0 0
    5/7/2025 21:45 0 0 0 19823.35 0 0 0 0
    5/7/2025 22:00 0 0 0 0 0 0 0 0
    5/7/2025 22:15 0 0 0 0 0 0 0 0
    5/7/2025 22:30 0 0 0 19975.95 0 19975.95 0 19975.95
    5/7/2025 23:45 0 0 0 0 0 0 0 0
    5/8/2025 1:00 0 0 19830.2 0 0 0 0 0
    5/8/2025 1:15 0 0 0 0 0 0 0 0
    5/8/2025 1:30 0 0 0 0 0 0 0 0
    5/8/2025 1:45 0 0 0 0 0 0 0 0


    I want this along with other datas in those rows:

    A B C D E F G H I
    5/7/2025 21:15 0 0 19598.8 0 19598.8 0 0 0
    5/7/2025 22:30 0 0 0 19975.95 0 19975.95 0 19975.95

    Continue reading...

Compartilhe esta Página