added foreach to attrdict
had the wrong aggregate Pandas type