generate ex from df