// fillNonCSVFieldDesc will set fieldDescMap[fieldName] = FieldDesc for parsing the numerical and string data
fillNonCSVFieldDesc will set fieldDescMap[fieldName] = FieldDesc for parsing the numerical and string data
// fillNonCSVFieldDesc will set fieldDescMap [ fieldName ] = FieldDesc for parsing the numerical and string data
func fillNonCSVFieldDesc(cellData string, fieldDescMap FieldDescMap, fieldName string) {
	_, err := strconv.ParseInt(cellData, 10, 32)
	if err != nil {
		_, err := strconv.ParseFloat(cellData, 32)
		if err == nil {
			if fieldDescMap[fieldName].Shape == nil {
				fieldDescMap[fieldName].Shape = []int{1}
			}
			fieldDescMap[fieldName].DType = Float
		} else {
			fieldDescMap[fieldName].DType = String
			fieldDescMap[fieldName].Shape = []int{1}
			if fieldDescMap[fieldName].Vocabulary == nil {
				fieldDescMap[fieldName].Vocabulary = make(map[string]string)
			}
			if _, ok := fieldDescMap[fieldName].Vocabulary[cellData]; !ok {
				fieldDescMap[fieldName].Vocabulary[cellData] = cellData
			}
		}
	} else {
		if fieldDescMap[fieldName].Shape == nil {
			fieldDescMap[fieldName].Shape = []int{1}
		}
	}
}
func fillNonCSVFieldDesc ( cellData string , fieldDescMap FieldDescMap , fieldName string ) { _ , err := strconv . ParseInt ( cellData , 10 , 32 ) if err != nil { _ , err := strconv . ParseFloat ( cellData , 32 ) if err == nil { if fieldDescMap [ fieldName ] . Shape == nil { fieldDescMap [ fieldName ] . Shape = [ ] int { 1 } } fieldDescMap [ fieldName ] . DType = Float } else { fieldDescMap [ fieldName ] . DType = String fieldDescMap [ fieldName ] . Shape = [ ] int { 1 } if fieldDescMap [ fieldName ] . Vocabulary == nil { fieldDescMap [ fieldName ] . Vocabulary = make ( map [ string ] string ) } if _ , ok := fieldDescMap [ fieldName ] . Vocabulary [ cellData ] ; ! ok { fieldDescMap [ fieldName ] . Vocabulary [ cellData ] = cellData } } } else { if fieldDescMap [ fieldName ] . Shape == nil { fieldDescMap [ fieldName ] . Shape = [ ] int { 1 } } } }
fillNonCSVFieldDesc will set fieldDescMap[fieldName] = FieldDesc for parsing the numerical and string data
fillNonCSVFieldDesc will set fieldDescMap [ fieldName ] = FieldDesc for parsing the numerical and string data
// column is float value // neither int nor float, should deal with string dtype // to form a category_id_column // initialize the vocabulary map // column is int value