Timescaledb Python Example For Loop