class_docstr: TextSet wraps a set of texts with status.
docstr: Read texts with id from csv file.
  Each record is supposed to contain the following two fields in order:
  id(string) and text(string).
  Note that the csv file should be without header.
  
  :param path: The path to the csv file. Local or distributed file system (such as HDFS)
               are supported. If you want to read from a distributed file system, sc
               needs to be specified.
  :param sc: An instance of SparkContext.
             If specified, texts will be read as a DistributedTextSet.
             Default is None and in this case texts will be read as a LocalTextSet.
  :param min_partitions: Int. A suggestion value of the minimal partition number for input
                         texts. Only need to specify this when sc is not None. Default is 1.
  
  :return: TextSet.
docstr_tok: ["Read","texts","with","id","from","csv","file",".","Each","record","is","supposed","to","contain","the","following","two","fields","in","order",":","id","(","string",")","and","text","(","string",")",".","Note","that","the","csv","file","should","be","without","header",".",":","param","path",":","The","path","to","the","csv","file",".","Local","or","distributed","file","system","(","such","as","HDFS",")","are","supported",".","If","you","want","to","read","from","a","distributed","file","system",",","sc","needs","to","be","specified",".",":","param","sc",":","An","instance","of","SparkContext",".","If","specified",",","texts","will","be","read","as","a","DistributedTextSet",".","Default","is","None","and","in","this","case","texts","will","be","read","as","a","LocalTextSet",".",":","param","min_partitions",":","Int",".","A","suggestion","value","of","the","minimal","partition","number","for","input","texts",".","Only","need","to","specify","this","when","sc","is","not","None",".","Default","is","1.",":","return",":","TextSet","."]
code: def read_csv(
      cls, path, sc=None, min_partitions=1, bigdl_type="float"
  ):
      """
      Read texts with id from csv file.
      Each record is supposed to contain the following two fields in order:
      id(string) and text(string).
      Note that the csv file should be without header.
  
      :param path: The path to the csv file. Local or distributed file system (such as HDFS)
                   are supported. If you want to read from a distributed file system, sc
                   needs to be specified.
      :param sc: An instance of SparkContext.
                 If specified, texts will be read as a DistributedTextSet.
                 Default is None and in this case texts will be read as a LocalTextSet.
      :param min_partitions: Int. A suggestion value of the minimal partition number for input
                             texts. Only need to specify this when sc is not None. Default is 1.
  
      :return: TextSet.
      """
      jvalue = callZooFunc(
          bigdl_type, "textSetReadCSV", path, sc, min_partitions
      )
      return TextSet(jvalue=jvalue)
  
imports: import six
  from bigdl.dllib.utils.common import JavaValue
  from bigdl.dllib.utils.file_utils import callZooFunc
  from pyspark import RDD
  from bigdl.dllib.utils.log4Error import *
label_desc: Use image node_id 24 for calling the TextSet obj's underlying member method code with example usage: obj.read_csv(cls, path, sc, min_partitions, bigdl_type) and returns: TextSet