nodes: 0, module; 1, function_definition; 2, function_name:gff3_to_dataframe; 3, parameters; 4, block; 5, identifier:path; 6, default_parameter; 7, default_parameter; 8, default_parameter; 9, default_parameter; 10, default_parameter; 11, default_parameter; 12, dictionary_splat_pattern; 13, expression_statement; 14, import_statement; 15, comment:# read records; 16, expression_statement; 17, comment:# load into pandas; 18, expression_statement; 19, if_statement; 20, expression_statement; 21, return_statement; 22, identifier:attributes; 23, None; 24, identifier:region; 25, None; 26, identifier:score_fill; 27, unary_operator; 28, identifier:phase_fill; 29, unary_operator; 30, identifier:attributes_fill; 31, string; 32, identifier:tabix; 33, string; 34, identifier:kwargs; 35, comment:"""Load data from a GFF3 into a pandas DataFrame.
  
      Parameters
      ----------
      path : string
          Path to input file.
      attributes : list of strings, optional
          List of columns to extract from the "attributes" field.
      region : string, optional
          Genome region to extract. If given, file must be position
          sorted, bgzipped and tabix indexed. Tabix must also be installed
          and on the system path.
      score_fill : int, optional
          Value to use where score field has a missing value.
      phase_fill : int, optional
          Value to use where phase field has a missing value.
      attributes_fill : object or list of objects, optional
          Value(s) to use where attribute field(s) have a missing value.
      tabix : string, optional
          Tabix command.
  
      Returns
      -------
      pandas.DataFrame
  
      """; 36, dotted_name; 37, assignment; 38, assignment; 39, identifier:attributes; 40, block; 41, assignment; 42, identifier:df; 43, integer:1; 44, integer:1; 45, string_content:.; 46, string_content:tabix; 47, identifier:pandas; 48, identifier:recs; 49, call; 50, identifier:columns; 51, list; 52, expression_statement; 53, identifier:df; 54, call; 55, identifier:list; 56, argument_list; 57, string; 58, string; 59, string; 60, string; 61, string; 62, string; 63, string; 64, string; 65, augmented_assignment; 66, attribute; 67, argument_list; 68, call; 69, string_content:seqid; 70, string_content:source; 71, string_content:type; 72, string_content:start; 73, string_content:end; 74, string_content:score; 75, string_content:strand; 76, string_content:phase; 77, identifier:columns; 78, call; 79, attribute; 80, identifier:from_records; 81, identifier:recs; 82, keyword_argument; 83, dictionary_splat; 84, identifier:iter_gff3; 85, argument_list; 86, identifier:list; 87, argument_list; 88, identifier:pandas; 89, identifier:DataFrame; 90, identifier:columns; 91, identifier:columns; 92, identifier:kwargs; 93, identifier:path; 94, keyword_argument; 95, keyword_argument; 96, keyword_argument; 97, keyword_argument; 98, keyword_argument; 99, keyword_argument; 100, identifier:attributes; 101, identifier:attributes; 102, identifier:attributes; 103, identifier:region; 104, identifier:region; 105, identifier:score_fill; 106, identifier:score_fill; 107, identifier:phase_fill; 108, identifier:phase_fill; 109, identifier:attributes_fill; 110, identifier:attributes_fill; 111, identifier:tabix; 112, identifier:tabix
code: def gff3_to_dataframe(path, attributes=None, region=None, score_fill=-1,
                        phase_fill=-1, attributes_fill='.', tabix='tabix', **kwargs):
      """Load data from a GFF3 into a pandas DataFrame.
  
      Parameters
      ----------
      path : string
          Path to input file.
      attributes : list of strings, optional
          List of columns to extract from the "attributes" field.
      region : string, optional
          Genome region to extract. If given, file must be position
          sorted, bgzipped and tabix indexed. Tabix must also be installed
          and on the system path.
      score_fill : int, optional
          Value to use where score field has a missing value.
      phase_fill : int, optional
          Value to use where phase field has a missing value.
      attributes_fill : object or list of objects, optional
          Value(s) to use where attribute field(s) have a missing value.
      tabix : string, optional
          Tabix command.
  
      Returns
      -------
      pandas.DataFrame
  
      """
  
      import pandas
  
      # read records
      recs = list(iter_gff3(path, attributes=attributes, region=region,
                            score_fill=score_fill, phase_fill=phase_fill,
                            attributes_fill=attributes_fill, tabix=tabix))
  
      # load into pandas
      columns = ['seqid', 'source', 'type', 'start', 'end', 'score', 'strand', 'phase']
      if attributes:
          columns += list(attributes)
      df = pandas.DataFrame.from_records(recs, columns=columns, **kwargs)
  
      return df