Postgres Replace In String In Python