[Python] How do I efficiently hash a Polars dataframe?

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

  1. Stack

    Stack Membro Participativo

    I am trying to implement some caching logic on a function that acts on a Polars dataframe (this is all in Python).

    To avoid needlessly re-computing the result, it'd be great if I could quickly check if the dataframe has changed - ie. a hash comparison.

    I am currently using:

    _my_hash = df.hash_rows().sum() # int


    But curious to know if there are better options.

    Continue reading...

Compartilhe esta Página