pub fn add_column<S: IntoSeries>(&mut self, column: S) -> Result<&mut Self> {
        let series = column.into_series();
        self.has_column(series.name())?;
        if series.len() == self.height() {
            self.columns.push(series);
            Ok(self)
        } else {
            Err(PolarsError::ShapeMisMatch(
                format!(
                    "Could add column. The Series length {} differs from the DataFrame height: {}",
                    series.len(),
                    self.height()
                )
                .into(),
            ))
        }
    }
/// Add a new column to this `DataFrame`.
Add a new column to this `DataFrame`.
Add a new column to this ` DataFrame ` .
pub fn add_column<S: IntoSeries>(&mut self, column: S) -> Result<&mut Self> {
        let series = column.into_series();
        self.has_column(series.name())?;
        if series.len() == self.height() {
            self.columns.push(series);
            Ok(self)
        } else {
            Err(PolarsError::ShapeMisMatch(
                format!(
                    "Could add column. The Series length {} differs from the DataFrame height: {}",
                    series.len(),
                    self.height()
                )
                .into(),
            ))
        }
    }
pub fn add_column < S : IntoSeries > ( & mut self , column : S ) -> Result < & mut Self > { let series = column . into_series ( ) ; self . has_column ( series . name ( ) ) ? ; if series . len ( ) == self . height ( ) { self . columns . push ( series ) ; Ok ( self ) } else { Err ( PolarsError :: ShapeMisMatch ( format ! ( " " series len ( ) self height ( ) ) . into ( ) , ) ) } }
Add a new column to this `DataFrame`.
Add a new column to this ` DataFrame ` .
&mut self
column
S
&mut self
column
S