Python Numpy Aggregate Functions Postgresql Create Index