Postgres String Contains Python Method Chaining