code: def _write_data(data, fp):
      
      fp.write("@data\n")
  
      def to_str(x):
          if pandas.isnull(x):
              return '?'
          else:
              return str(x)
  
      data = data.applymap(to_str)
      n_rows = data.shape[0]
      for i in range(n_rows):
          str_values = list(data.iloc[i, :].apply(_check_str_array))
          line = ",".join(str_values)
          fp.write(line)
          fp.write("\n")
docs: Write the data section