updated python notebook for postgres work