Flatten frame properties in python