import pandas as pd
#creating temp df for example
details = {
'Name' : ['Ankit', 'Aishwarya', 'Shaurya', 'Shivangi', 'Priya', 'Swapnil'],
'Nick_Name' : ['Ankit', 'Aish', 'Shaurya', 'Shiv', 'Priya', 'Lucky'],
}
# creating a Dataframe object
df = pd.DataFrame(details, columns = ['Name', 'Nick_Name',],index = ['a', 'b', 'c', 'd', 'e', 'f'])
index_names = df[ (df['Name'] == df['Nick_Name'])].index
df.drop(index_names, inplace = True)
print(df)