pandas去重
import pandas as pd data = pd.DataFrame([[1, 2], [1, 2], [3, 2], [1, 3], [1, 2]]) # 去重 data_new = data.drop_duplicates() print(data_new)
0 1
0 1 2
2 3 2
3 1 3
import pandas as pd data = pd.DataFrame([[1, 2], [1, 2], [3, 2], [1, 3], [1, 2]]) # 去重 data_new = data.drop_duplicates() print(data_new)
0 1
0 1 2
2 3 2
3 1 3