Lazy dataframes (#5546)

* lazyframe definition

* expressions and lazy frames

* new alias expression

* more expression commands

* updated to polars main

* more expressions and groupby

* more expressions, fetch and sort-by

* csv reader

* removed open csv

* unique function

* joining functions

* join lazy frames commands with eager commands

* corrected tests

* Update .gitignore

* Update .gitignore

Co-authored-by: JT <547158+jntrnr@users.noreply.github.com>
This commit is contained in:
Fernando Herrera
2022-05-16 08:27:43 +01:00
committed by GitHub
parent 2062e33c37
commit 8bd68416e3
71 changed files with 3304 additions and 1364 deletions

View File

@ -238,6 +238,31 @@ impl FromValue for Vec<String> {
}
}
impl FromValue for Vec<bool> {
fn from_value(v: &Value) -> Result<Self, ShellError> {
match v {
Value::List { vals, .. } => vals
.iter()
.map(|val| match val {
Value::Bool { val, .. } => Ok(*val),
c => Err(ShellError::CantConvert(
"bool".into(),
c.get_type().to_string(),
c.span()?,
None,
)),
})
.collect::<Result<Vec<bool>, ShellError>>(),
v => Err(ShellError::CantConvert(
"bool".into(),
v.get_type().to_string(),
v.span()?,
None,
)),
}
}
}
impl FromValue for CellPath {
fn from_value(v: &Value) -> Result<Self, ShellError> {
let span = v.span()?;