Removing Duplicates
To remove the duplicate rows, simply use function drop_duplicates()
. To change the current dataframe, add inplace=True
.
123new_data = data.drop_duplicates() # data is not modified # or data.drop_duplicates(inplace=True) # data is modified
Swipe to start coding
The planets
dataset is given to you. Remove the duplicates and then check the new shape of dataframe. Compare it with the original shape.
Note that dataframe may have only distinct records, in this case, the shape will remain the same.
Soluzione
Grazie per i tuoi commenti!
single
Chieda ad AI
Chieda ad AI
Chieda pure quello che desidera o provi una delle domande suggerite per iniziare la nostra conversazione
Riassuma questo capitolo
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 5.56
Removing Duplicates
Scorri per mostrare il menu
To remove the duplicate rows, simply use function drop_duplicates()
. To change the current dataframe, add inplace=True
.
123new_data = data.drop_duplicates() # data is not modified # or data.drop_duplicates(inplace=True) # data is modified
Swipe to start coding
The planets
dataset is given to you. Remove the duplicates and then check the new shape of dataframe. Compare it with the original shape.
Note that dataframe may have only distinct records, in this case, the shape will remain the same.
Soluzione
Grazie per i tuoi commenti!
Awesome!
Completion rate improved to 5.56single