Some sophisticated table manipulation using petl