How To Use Aggregate Function In Python