Rails Postgres String To Integer Python