code: def write_matrix_to_csv(self, headers, data):
          
          with open(self.path, "w") as out_file:  # write to file
              data_writer = csv.writer(out_file, delimiter=",")
              data_writer.writerow(headers)  # write headers
              data_writer.writerows(data)
docs: Saves .csv file with data
  
          :param headers: column names
          :param data: Data