[Python] How to read categorical columns with pandas' read_csv?

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

  1. Stack

    Stack Membro Participativo

    I have tried passing the dtype parameter with read_csv as dtype={n: pandas.Categorical} but this does not work properly (the result is an Object). The manual is unclear.

    Is it possible to read categorical columns with pd.read_csv?

    Continue reading...

Compartilhe esta Página