Postgresql Remove Duplicate Rows Python