[Python] Why does df.isnull().sum() work the way it does?

Discussão em 'Python' iniciado por Stack, Abril 13, 2025.

  1. Stack

    Stack Membro Participativo

    When I do df.isnull().sum(), I get the count of null values in a column. But the default axis for .sum() is None, or 0 - which should be summing across the columns.

    Why does .sum() calculate the sum down the columns, instead of the rows, when the default says to sum across axis = 0?

    Thanks!

    Continue reading...

Compartilhe esta Página