<commit_before>def convert_table(array)
  return_array = []
  array.each do |row|
    data_hash = Hash.new
    data_hash[array[0][0]] = row[0]
    data_hash[array[0][1]] = row[1]
    data_hash[array[0][2]] = row[2]
    data_hash[array[0][3]] = row[3]
    return_array.push(data_hash)
  end

  return return_array[1..3]
end

table_data = [
  ["first_name", "last_name", "city", "state"],
  ["Elisabeth", "Gardenar", "Toledo", "OH"],
  ["Jamaal", "Du", "Sylvania", "OH"],
  ["Kathlyn", "Lavoie", "Maumee", "OH"]
]

p convert_table(table_data)

#  { "first_name" => "Elisabeth", "last_name" => "Gardenar", "city" => "Toledo", "state" => "OH" },
#  { "first_name" => "Jamaal", "last_name" => "Du", "city" => "Sylvania", "state" => "OH" },<commit_msg>experimented with working with arrays but returned to original<commit_after>def convert_table(array)
  return_array = []
  array.map.each do |row|
    data_hash = Hash.new
    data_hash[array[0][0]] = row[0]
    data_hash[array[0][1]] = row[1]
    data_hash[array[0][2]] = row[2]
    data_hash[array[0][3]] = row[3]
    return_array.push(data_hash)
  end

  return return_array[1..3]
end

table_data = [
  ["first_name", "last_name", "city", "state"],
  ["Elisabeth", "Gardenar", "Toledo", "OH"],
  ["Jamaal", "Du", "Sylvania", "OH"],
  ["Kathlyn", "Lavoie", "Maumee", "OH"]
]

p convert_table(table_data)

#  { "first_name" => "Elisabeth", "last_name" => "Gardenar", "city" => "Toledo", "state" => "OH" },
#  { "first_name" => "Jamaal", "last_name" => "Du", "city" => "Sylvania", "state" => "OH" },
{'fraction_non_alphanumeric': 0.23106796116504855, 'fraction_numerical': 0.018122977346278317, 'mean_word_length': 4.725925925925926, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7461518', 'n_tokens_mistral': 655, 'n_tokens_neox': 642, 'n_words': 120}