Секція 2. Розділ 7
single
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.
Рішення
Все було зрозуміло?
Дякуємо за ваш відгук!
Секція 2. Розділ 7
single
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат