// checkColumns checks that the number of columns is equal to the number of
// parts. If so it returns with skip set to false. If not skip is set to
// true, the error is added to the dataframe and if errors are not allowed
// then the error is returned.
checkColumns checks that the number of columns is equal to the number of
parts. If so it returns with skip set to false. If not skip is set to
true, the error is added to the dataframe and if errors are not allowed
then the error is returned.
// checkColumns checks that the number of columns is equal to the number of // parts . If so it returns with skip set to false . If not skip is set to // true the error is added to the dataframe and if errors are not allowed // then the error is returned .
func checkColumns(dfr *DFReader, state *dfReadState, df *DF) (bool, error) {
	if len(df.mci.info) == len(state.cols) {
		return false, nil
	}
	errStr := fmt.Sprintf(
		"%s: the dataframe has %d columns but this line has %d: ",
		state.loc, len(df.mci.info), len(state.cols))
	for i, col := range state.cols {
		errStr += fmt.Sprintf(" col %d: %q", i, col)
	}
	var err error = dfError(errStr)
	df.addError(err)
	if dfr.allowErrors {
		err = nil
	}
	return true, err
}
func checkColumns ( dfr * DFReader , state * dfReadState , df * DF ) ( bool , error ) { if len ( df . mci . info ) == len ( state . cols ) { return false , nil } errStr := fmt . Sprintf ( " " , state . loc , len ( df . mci . info ) , len ( state . cols ) ) for i , col := range state . cols { errStr += fmt . Sprintf ( " " , i , col ) } var err error = dfError ( errStr ) df . addError ( err ) if dfr . allowErrors { err = nil } return true , err }
checkColumns checks that the number of columns is equal to the number of
parts.
checkColumns checks that the number of columns is equal to the number of parts .