pub fn sort(self, by_column: &str, reverse: bool) -> Self {
        let opt_state = self.get_opt_state();
        let lp = self
            .get_plan_builder()
            .sort(by_column.into(), reverse)
            .build();
        Self::from_logical_plan(lp, opt_state)
    }
/// Add a sort operation to the logical plan.
///
/// # Example
///
/// ```rust
/// use polars::prelude::*;
///
/// /// Sort DataFrame by 'sepal.width' column
/// fn example(df: DataFrame) -> LazyFrame {
///       df.lazy()
///         .sort("sepal.width", false)
/// }
/// ```
Add a sort operation to the logical plan.
Add a sort operation to the logical plan .
pub fn sort(self, by_column: &str, reverse: bool) -> Self {
        let opt_state = self.get_opt_state();
        let lp = self
            .get_plan_builder()
            .sort(by_column.into(), reverse)
            .build();
        Self::from_logical_plan(lp, opt_state)
    }
pub fn sort ( self , by_column : & str , reverse : bool ) -> Self { let opt_state = self . get_opt_state ( ) ; let lp = self . get_plan_builder ( ) . sort ( by_column . into ( ) , reverse ) . build ( ) ; Self :: from_logical_plan ( lp , opt_state ) }
Add a sort operation to the logical plan.
Add a sort operation to the logical plan .
self
by_column
&str
reverse
bool
self
by_column
&str
reverse
bool
example
```rust
use polars::prelude::*.

Sort DataFrame by 'sepal.width' column
fn example(df: DataFrame) -> LazyFrame {
df.lazy()
.sort("sepal.width", false)
}
```
` ` ` rust use polars :: prelude :: * . Sort DataFrame by ' sepal . width ' column fn example ( df : DataFrame ) - > LazyFrame { df . lazy () . sort ( " sepal . width " false ) } ` ` `