/// Find the index of the column with the given name.
Find the index of the column with the given name.
Find the index of the column with the given name .
pub fn index_of(&self, name: &str) -> Result<usize> {
        for i in 0..self.fields.len() {
            if self.fields[i].name() == name {
                return Ok(i);
            }
        }
        let valid_fields: Vec<String> = self.fields.iter().map(|f| f.name().clone()).collect();
        Err(ArrowError::InvalidArgumentError(format!(
            "Unable to get field named \"{}\". Valid fields: {:?}",
            name, valid_fields
        )))
    }
pub fn index_of ( & self , name : & str ) -> Result < usize > { for i in 0 .. self . fields . len ( ) { if self . fields [ i ] . name ( ) == name { return Ok ( i ) ; } } let valid_fields : Vec < String > = self . fields . iter ( ) . map ( | f | f . name ( ) . clone ( ) ) . collect ( ) ; Err ( ArrowError :: InvalidArgumentError ( format ! ( " \" \" " name valid_fields ) ) ) }
Find the index of the column with the given name.
Find the index of the column with the given name .
&self
name
&str