[Python] Int too large to convert to C long while doing .astype(int)

Discussão em 'Python' iniciado por Stack, Fevereiro 6, 2025.

  1. Stack

    Stack Membro Participativo

    I'm running a python script, where I have to convert a string column from a pandas df to int, using the astype(int) method. However, I get this following error:

    "Python int too large to convert to C long"


    My strings are all numbers in string format, up to 15 characters. Is there a way to convert this column to int type without this popping this error?

    Continue reading...

Compartilhe esta Página