[Python] Saving a cleaned dataframe python

Discussão em 'Python' iniciado por Stack, Setembro 14, 2024.

  1. Stack

    Stack Membro Participativo

    i'm working on cleaning a huge dataset, i've finished to clean it and want to save it in a new CSV So i can start a new notebook from the cleaned.CSV The problem is when i save it into a new CSV i lost a lot of data. See below my first df.info with 307381 non-null everywhere and Index: 307381 entries, 6 to 999755.

    [​IMG]

    So i use the folowing code to save it:

    df.to_csv('cleaned.csv',";")

    then i open this new dataset (suppose to be cleaned) in df1

    and i have a completely uncleaned dataset see second picture RangeIndex: 313300 entries, 0 to 313299 and differents value in "non-null"

    If you have a solution, i would be happy to hear about it.

    [​IMG]

    Continue reading...

Compartilhe esta Página