Refactored csv_to_df