class_docstr: a tool that transfer label-studio export file to the dataframe for autogluon training. Docs available at
  https://github.com/autogluon/autogluon/tree/master/examples/automm/label_studio/label_studio_export_reader
class_docstr_tok: ["a","tool","that","transfer","label-studio","export","file","to","the","dataframe","for","autogluon","training",".","Docs","available","at","https",":","\/\/github.com\/autogluon\/autogluon\/tree\/master\/examples\/automm\/label_studio\/label_studio_export_reader"]
docstr: data: text
  process export file from label-studio NER template,
  return the overall and label Dataframe for Autogluon input
  param:
  - path: str: the local path of exported file
  - data_columns: list[str](Optional) key or column names of data
  - label_columns: list[str](Optional) key or column names of label
docstr_tok: ["data",":","text","process","export","file","from","label-studio","NER","template",",","return","the","overall","and","label","Dataframe","for","Autogluon","input","param",":","-","path",":","str",":","the","local","path","of","exported","file","-","data_columns",":","list","[","str","]","(","Optional",")","key","or","column","names","of","data","-","label_columns",":","list","[","str","]","(","Optional",")","key","or","column","names","of","label"]
code: def from_named_entity_recognition(
      self, path, data_columns=None, label_columns=None
  ):
      """
      data: text
      process export file from label-studio NER template,
      return the overall and label Dataframe for Autogluon input
      param:
      - path: str: the local path of exported file
      - data_columns: list[str](Optional) key or column names of data
      - label_columns: list[str](Optional) key or column names of label
      """
  
      if not os.path.exists(path):
          raise OSError("annotation file path not exists.")
  
      # get file extension with os,distinguish JSON and JSON-MIN
      _, file_extension = os.path.splitext(path)
      file_extension = file_extension[1:]
      if file_extension == "json":
          with open(path, mode="r") as fp:
              json_content = json.load(fp)
              if "annotations" not in json_content[0]:
                  file_extension = "json_min"
  
      # get the data and label columns through default NER template
      default_data, default_label = self.get_columns_by_type(
          TaskType.NAMED_ENTITY_RECOGNITION, format=file_extension
      )
      data = data_columns if data_columns else default_data
      label = label_columns if label_columns else default_label
  
      df = get_dataframes_by_path(path, data, label)
      return df, df[label]
  
file_path: autogluon/multimodal/src/autogluon/multimodal/utils/label_studio.py
imports: import json
  import os
  from enum import Enum
  import pandas
label_desc: Use image node_id 6 for calling the LabelStudioReader obj's underlying member method code with example usage: obj.from_named_entity_recognition(path, data_columns, label_columns) and returns: df,  df