Answers for "python dataframe remove duplicate rows with same index"

2

remove duplicates based on two columns in dataframe

df.drop_duplicates(['A','B'],keep= 'last')
Posted by: Guest on August-13-2020
0

pandas remove repeated index

df[~df.index.duplicated()]
Posted by: Guest on August-17-2020

Code answers related to "python dataframe remove duplicate rows with same index"

Python Answers by Framework

Browse Popular Code Answers by Language