Same problem but it didn't help. How To Solve KeyError: u"None of [Index([..], dtype='object')] are in the [columns]" First try:
df = pd.read_csv('ABCD.csv', index_col=['A'])
df=df.drop_duplicates(['A'],['B'])
KeyError: Index(['Sample_ID'], dtype='object')
Here I have found out that it impossible to removed the index itself so I removed it from the top:
df = pd.read_csv('ABCD.csv')
df=df.drop_duplicates(['A'],['B'],keep = 'first')
TypeError: drop_duplicates() got multiple values for argument 'keep'
When I print df(type) it posts "DataFrame" , what could be the problem?