[Python] How can i change a column data type in pandas without creating null values in the...

Discussão em 'Python' iniciado por Stack, Dezembro 18, 2024.

  1. Stack

    Stack Membro Participativo

    I have been getting null values when trying to convert a column with the non-numeric type values to a column with numeric type values

    I have been using the below code line to change my column data type so that i can fill them null values in my 'gross' column but it has been giving me null values(Nan) in the whole 'gross' column what can i do:

    # read['Gross']=pd.to_numeric(read['Gross'], errors='coerce')

    Continue reading...

Compartilhe esta Página