title: How to drop duplicates in excel using python
body: <p>I am trying to drop duplicates in an excel by using below code.</p>
  <pre><code>import pandas as pd
  
  file1='emp_list.xlsx'
  df1=pd.read_excel(file1)
  df1.drop_duplicates(subset=['EMP_NAME','EMP_LOCATION'], keep=last)
  print(df1)
  </code></pre>
  <p>It is giving an error:</p>
  <pre><code>KeyError: Index(['EMP_LOCATION'], dtype='object')
  </code></pre>
  <p>Can anyone help on this?</p>