Extract helper method and introduce method to get data frame from scan.ex.