import pandas as pd

df = pd.read_excel("./aaa.xlsx",dtype=object)
df=df.drop_duplicates(subset=['from_ip','receive_ip'])

df =df[df['from_ip']!=df['receive_ip']].reset_index(drop=True)

df = df.to_excel("./aaa.xlsx",index=False )