Drop Duplicates from pandas DataFrame | How to Remove Repeated Row | All & Multiple Selected Columns

preview_player
Показать описание
Python code of this video:

import pandas as pd # Load pandas library

data = pd.DataFrame({'x1':[1, 1, 1, 2, 2, 3, 4], # Create example DataFrame
'x2':[5, 5, 5, 5, 5, 5, 5],
'x3':['a', 'a', 'a', 'b', 'c', 'd', 'e']})
print(data) # Print example DataFrame

print(data_new1) # Print new data

print(data_new2) # Print new data

Follow me on Social Media:

Рекомендации по теме