generate_data function

Generate new data from a data frame.