code: def writeGTF(inGTF,file_path):
      
      cols=inGTF.columns.tolist()
      if len(cols) == 9:
          if 'attribute' in cols:
              df=inGTF
      else:
          df=inGTF[cols[:8]]
          df['attribute']=""
          for c in cols[8:]:
              if c == cols[len(cols)-1]:
                  df['attribute']=df['attribute']+c+' "'+inGTF[c].astype(str)+'";'
              else:
                  df['attribute']=df['attribute']+c+' "'+inGTF[c].astype(str)+'"; '
      df.to_csv(file_path, sep="\t",header=None,index=None,quoting=csv.QUOTE_NONE)
docs: Write a GTF dataframe into a file
  
      :param inGTF: GTF dataframe to be written. It should either have 9 columns with the last one being the "attributes" section or more than 9 columns where all columns after the 8th will be colapsed into one.
      :param file_path: path/to/the/file.gtf
      :returns: nothing