Suppose I have a dataframe as follows:
In [1]: test_dup_df Out[1]: exe_price exe_vol flag 2008-03-13 14:41:07 84.5 200 yes 2008-03-13
Not terribly familiar with pandas, but in pure numpy you could do:
pandas
tot_vol = np.sum(grouped['exe_vol']) avg_price = np.average(grouped['exe_price'], weights=grouped['exe_vol'])