df[df[‘target’]==df[‘shape’]]
または
df.query(‘target==shape’)