Modified  get_dataframe_and_info to read columns directly from database - related to previous commit