Add dict_to_row function.
Renamed variables to reflect generality of row_to_dict
Removed unnecessary generator expression.