csv读取

作者: Rex_Diego | 来源:发表于2017-01-11 20:46 被阅读0次
    lines = asciiread(filename,-1,"string")
    nlines = dimsizes(lines)
    delim       = ","
    field_names = str_split(lines(0),delim)
    nfields     = dimsizes(field_names)
    fields = new((/nfields,nlines/),float)
    
    do nf=0,nfields-1
          fields(nf,:) = tofloat(str_get_field(lines,nf+1,delim))
    end do
    

    相关文章

      网友评论

          本文标题:csv读取

          本文链接:https://www.haomeiwen.com/subject/vmwrbttx.html